summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmviewstyle_1.h
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwmviewstyle_1.h') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.h b/pwmanager/pwmanager/pwmviewstyle_1.h
index a50f587..a7f100c 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.h
+++ b/pwmanager/pwmanager/pwmviewstyle_1.h
@@ -16,84 +16,89 @@
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#ifndef PWMVIEWSTYLE_1_H 20#ifndef PWMVIEWSTYLE_1_H
21#define PWMVIEWSTYLE_1_H 21#define PWMVIEWSTYLE_1_H
22 22
23#include <qvbox.h> 23#include <qvbox.h>
24 24
25#ifndef PWM_EMBEDDED 25#ifndef PWM_EMBEDDED
26#include <qtextedit.h> 26#include <qtextedit.h>
27#include <qsplitter.h> 27#include <qsplitter.h>
28#else 28#else
29#include <qmultilineedit.h> 29#include <qmultilineedit.h>
30#include <KDGanttMinimizeSplitter.h> 30#include <KDGanttMinimizeSplitter.h>
31#endif 31#endif
32 32
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qlistbox.h> 34#include <qlistbox.h>
35#include <qpopupmenu.h> 35#include <qpopupmenu.h>
36 36
37class PwMView; 37class PwMView;
38class ListViewPwM; 38class ListViewPwM;
39class CommentBox; 39class CommentBox;
40class PWMPrefs;
40 41
41class PwMViewStyle_1 : public QObject 42class PwMViewStyle_1 : public QObject
42{ 43{
43 Q_OBJECT 44 Q_OBJECT
44public: 45public:
45 PwMViewStyle_1(PwMView *view); 46 PwMViewStyle_1(PwMView *view);
46 ~PwMViewStyle_1(); 47 ~PwMViewStyle_1();
47 48
48 ListViewPwM * getLv() 49 ListViewPwM * getLv()
49 { return lv; } 50 { return lv; }
50 CommentBox * getCommentBox() 51 CommentBox * getCommentBox()
51 { return commentBox; } 52 { return commentBox; }
52 53
53 /** returns the currently selected category */ 54 /** returns the currently selected category */
54 QString getCurrentCategory() 55 QString getCurrentCategory()
55 { return categoriesList->currentText(); } 56 { return categoriesList->currentText(); }
56 /** add Category to the view */ 57 /** add Category to the view */
57 void addCategory(const QString &cat) 58 void addCategory(const QString &cat)
58 { categoriesList->insertItem(cat); } 59 { categoriesList->insertItem(cat); }
59 /** delete Category from view */ 60 /** delete Category from view */
60 void delCategory(const QString &cat); 61 void delCategory(const QString &cat);
61 /** delete all categories from view */ 62 /** delete all categories from view */
62 void delAllCategories() 63 void delAllCategories()
63 { categoriesList->clear(); } 64 { categoriesList->clear(); }
64 /** select the specified category */ 65 /** select the specified category */
65 void selectCategory(const QString &cat); 66 void selectCategory(const QString &cat);
66 /** returns the number of categories in this view. 67 /** returns the number of categories in this view.
67 * This value dosn't say anything about the number of 68 * This value dosn't say anything about the number of
68 * categories in the document. 69 * categories in the document.
69 */ 70 */
70 int numCategories() 71 int numCategories()
71 { return categoriesList->count(); } 72 { return categoriesList->count(); }
72 /** resize the view */ 73 /** resize the view */
73 void resize(const QSize &size) 74 void resize(const QSize &size)
74 { splitter->resize(size); } 75 { splitter->resize(size); }
75 76
77 //US ENH: I need a place to load the view dependend settings. Eg. splittersize
78 void restoreSettings(PWMPrefs* prefs);
79 void saveSettings(PWMPrefs* prefs);
80
76protected slots: 81protected slots:
77 /** user clicked right button in category list */ 82 /** user clicked right button in category list */
78 void catRightClick(QListBoxItem *item, const QPoint &point); 83 void catRightClick(QListBoxItem *item, const QPoint &point);
79 84
80protected: 85protected:
81 /** main list view */ 86 /** main list view */
82 ListViewPwM *lv; 87 ListViewPwM *lv;
83#ifndef PWM_EMBEDDED 88#ifndef PWM_EMBEDDED
84 /** main splitter widget */ 89 /** main splitter widget */
85 QSplitter *splitter; 90 QSplitter *splitter;
86 /** commentTextEdit splitter */ 91 /** commentTextEdit splitter */
87 QSplitter *splitter2; 92 QSplitter *splitter2;
88#else 93#else
89 /** main splitter widget */ 94 /** main splitter widget */
90 KDGanttMinimizeSplitter *splitter; 95 KDGanttMinimizeSplitter *splitter;
91 /** commentTextEdit splitter */ 96 /** commentTextEdit splitter */
92 KDGanttMinimizeSplitter *splitter2; 97 KDGanttMinimizeSplitter *splitter2;
93#endif 98#endif
94 99
95 /** categories list-box */ 100 /** categories list-box */
96 QListBox *categoriesList; 101 QListBox *categoriesList;
97 /** title string for the categories combo or list box */ 102 /** title string for the categories combo or list box */
98 QLabel *categoriesTitle; 103 QLabel *categoriesTitle;
99 /** hbox1 for widget style */ 104 /** hbox1 for widget style */