Rev 13809 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13808 | pierre | 1 | /*************************************************************************** |
2 | * Copyright (C) 2009 by Pierre Marchand * |
||
3 | * pierre@oep-h.com * |
||
4 | * * |
||
5 | * This program is free software; you can redistribute it and/or modify * |
||
6 | * it under the terms of the GNU General Public License as published by * |
||
7 | * the Free Software Foundation; either version 2 of the License, or * |
||
8 | * (at your option) any later version. * |
||
9 | * * |
||
10 | * This program is distributed in the hope that it will be useful, * |
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
13 | * GNU General Public License for more details. * |
||
14 | * * |
||
15 | * You should have received a copy of the GNU General Public License * |
||
16 | * along with this program; if not, write to the * |
||
17 | * Free Software Foundation, Inc., * |
||
18122 | mrdocs | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * |
13808 | pierre | 19 | ***************************************************************************/ |
20 | |||
21 | #ifndef OPENPALETTE_H |
||
22 | #define OPENPALETTE_H |
||
23 | |||
24 | #include "ui/scrpalettebase.h" |
||
25 | |||
13809 | pierre | 26 | #include <QDialog> |
13808 | pierre | 27 | #include <QList> |
28 | #include <QVBoxLayout> |
||
29 | |||
30 | class PageItemSetterBase; |
||
31 | |||
32 | /** |
||
33 | * An OpenPalette is aimed to host dropped setters |
||
34 | * and in some extent to serialize its content and |
||
35 | * layout in order to reload it over sessions |
||
36 | */ |
||
13809 | pierre | 37 | class OpenPalette : public QDialog |
13808 | pierre | 38 | { |
13809 | pierre | 39 | Q_OBJECT |
40 | |||
41 | OpenPalette(){} |
||
13808 | pierre | 42 | public: |
43 | OpenPalette(QWidget * parent); |
||
13809 | pierre | 44 | ~OpenPalette(){} |
45 | QStringList hostedList() const; |
||
46 | void setHosted(const QStringList& sList); |
||
13808 | pierre | 47 | |
48 | protected: |
||
13809 | pierre | 49 | void closeEvent(QCloseEvent *event); |
50 | void showEvent(QShowEvent *event); |
||
51 | void hideEvent(QHideEvent *event); |
||
13808 | pierre | 52 | void dragEnterEvent( QDragEnterEvent *event ); |
53 | void dropEvent ( QDropEvent * event ); |
||
54 | |||
55 | private: |
||
56 | QList<PageItemSetterBase*> hosted; |
||
57 | QVBoxLayout * mainLayout; |
||
58 | |||
13809 | pierre | 59 | signals: |
60 | void changed(); |
||
61 | |||
13808 | pierre | 62 | }; |
63 | |||
64 | #endif // OPENPALETTE_H |