18 QGridLayout*
layout =
new QGridLayout(
this);
22 headers <<
"Text" <<
"Message" <<
"Type";
27 QPushButton* add =
new QPushButton(tr(
"add"),
this);
29 layout->addWidget(add, 4, 0, 1, 2);
31 QPushButton* remove =
new QPushButton(tr(
"remove"),
this);
33 layout->addWidget(remove, 4, 2, 1, 2);
35 myText =
new QLineEdit(
this);
41 myType =
new QComboBox(
this);
42 myType->addItem(tr(
"say"));
43 myType->addItem(tr(
"reply"));
44 myType->addItem(tr(
"question"));
71 add <<
"text" <<
"message" <<
"0";
81 if (idx < 0 || idx >=
myData.size())
91 while (
data.size() > 3)
93 while (
data.size() < 3)
114 if (idx < 0 || idx >=
myData.size())
120 data.append(QString::number(
myType->currentIndex()));
133 if (idx < 0 || idx >=
myData.size())
142 myType->setCurrentIndex(0);