git-svn-id: svn://db.shs.com.ru/libs@40 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -15,9 +15,9 @@ class StringListEdit: public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
StringListEdit(QWidget * parent = 0);
|
||||
~StringListEdit() {delete combo; delete butt_add; delete butt_del; delete butt_clear;}
|
||||
~StringListEdit();
|
||||
|
||||
QStringList value() const {QStringList l; for (int i = 0; i < combo->count(); ++i) l << combo->itemText(i); return l;}
|
||||
QStringList value() const;
|
||||
|
||||
private:
|
||||
virtual void changeEvent(QEvent * e);
|
||||
@@ -27,13 +27,13 @@ private:
|
||||
QPushButton * butt_add, * butt_del, * butt_clear;
|
||||
|
||||
public slots:
|
||||
void setValue(const QStringList & v) {combo->clear(); combo->addItems(v); combo->setCurrentIndex(0);}
|
||||
void setValue(const QStringList & v);
|
||||
|
||||
private slots:
|
||||
void editItem();
|
||||
void addItem() {combo->addItem(combo->currentText()); emit valueChanged();}
|
||||
void delItem() {if (combo->currentIndex() < 0) return; combo->removeItem(combo->currentIndex()); emit valueChanged();}
|
||||
void clear() {if (combo->count() == 0) return; combo->clear(); emit valueChanged();}
|
||||
void addItem();
|
||||
void delItem();
|
||||
void clear();
|
||||
|
||||
signals:
|
||||
void valueChanged();
|
||||
|
||||
Reference in New Issue
Block a user