00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OMGLISTWIDGET_H
00022 #define OMGLISTWIDGET_H
00023
00024 #include <ui_omglistwidgetbase.h>
00025
00026
00027
00028
00029 class QListWidgetItem;
00030 class QStringList;
00031
00032 class OMG_LIB_EXPORT OmgListWidget : public QWidget, private Ui::OmgListWidgetBase
00033 {
00034 Q_OBJECT;
00035
00036 public:
00037 OmgListWidget(QWidget* parent = 0, Qt::WFlags fl = 0 );
00038 ~OmgListWidget();
00039
00041
00043 int count();
00044 QListWidgetItem * item(int theItem);
00045
00046 public slots:
00047
00049 void selectAll();
00050 void invertSelection();
00051 void selectNone();
00055 int checkedItemCount();
00060 QStringList checkedItems();
00066 QStringList checkedDataItems();
00068 void hideOptionsTool();
00070 void showOptionsTool();
00077 void hideAddItemTool();
00084 void showAddItemTool();
00086
00088 void addItem ( const QString & theLabel, bool theCheckedFlag );
00089 void addItem ( QListWidgetItem * thepItem, bool theCheckedFlag );
00090 void addItems ( const QStringList & theLabels, bool theCheckedFlag );
00091 void clear();
00092 void insertItem ( int theRow, QListWidgetItem * thepItem, bool theCheckedFlag );
00093 void insertItem ( int theRow, const QString & theLabel, bool theCheckedFlag );
00094 void insertItems ( int theRow, const QStringList & theLabels, bool theCheckedFlag );
00095 protected:
00096
00097
00098 public slots:
00099
00104 void itemPressedSlot(QListWidgetItem * theItem);
00105
00106 signals:
00107
00108 void itemPressed(QListWidgetItem * thepItem);
00109 void addItemClicked();
00110 void configureClicked();
00111
00112 private:
00113
00114 private slots:
00116
00118 void on_toolSelectAll_clicked();
00119 void on_toolSelectNone_clicked();
00120 void on_toolInvertSelection_clicked();
00121 void on_toolAddItem_clicked();
00122 void on_toolConfigure_clicked();
00123 };
00124
00125 #endif
00126