Scribus
Open source desktop publishing at your fingertips
multicombobox.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #include <QComboBox>
8 #include <QListView>
9 #include <QStandardItemModel>
10 
11 class QEvent;
12 class QObject;
13 class QModelIndex;
14 class QWidget;
15 class multiCombobox;
16 
17 class multiComboboxModel : public QStandardItemModel
18 {
19  public:
20  multiComboboxModel ( QObject* parent = 0 );
21  Qt::ItemFlags flags ( const QModelIndex& index ) const;
22 };
23 
24 
25 class multiView : public QListView
26 {
27  public:
28  multiView ( QWidget* parent = 0 );
29  multiView ( multiCombobox* parent );
30  bool eventFilter ( QObject* object, QEvent* event );
31 
32  private:
33  multiCombobox *parentMcb;
34 };
35 
36 
37 class multiCombobox : public QComboBox
38 {
39  Q_OBJECT
40 
41  public:
42  multiCombobox ( QWidget *parent = 0 );
43 
44  void setCheckstate ( int index, int checked );
45  int checkstate ( int index );
46  void switchCheckstate ( int row );
47 
48  int addItem ( QString text, int checked=0 );
49 
50  private:
51  multiComboboxModel *mcbModel;
52  multiView *mcbView;
53 
54  signals:
55  void checkstateChanged ( int );
56 };
Definition: multicombobox.h:25
Definition: multicombobox.h:17
Definition: multicombobox.h:37