summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmviewstyle_0.h
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwmviewstyle_0.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.h b/pwmanager/pwmanager/pwmviewstyle_0.h
new file mode 100644
index 0000000..cc564c3
--- a/dev/null
+++ b/pwmanager/pwmanager/pwmviewstyle_0.h
@@ -0,0 +1,99 @@
1/***************************************************************************
2 * *
3 * copyright (C) 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. *
9 * *
10 ***************************************************************************/
11
12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde
16 *
17 * $Id$
18 **************************************************************************/
19
20#ifndef PWMVIEWSTYLE_0_H
21#define PWMVIEWSTYLE_0_H
22
23#include <qhbox.h>
24#include <qvbox.h>
25#include <qpushbutton.h>
26#ifndef PWM_EMBEDDED
27#include <qtextedit.h>
28#include <qsplitter.h>
29#else
30#include <qmultilineedit.h>
31#include <KDGanttMinimizeSplitter.h>
32#endif
33#include <qlabel.h>
34#include <qcombobox.h>
35
36class PwMView;
37class ListViewPwM;
38class CommentBox;
39
40class PwMViewStyle_0 : public QObject
41{
42public:
43 PwMViewStyle_0(PwMView *view);
44 ~PwMViewStyle_0();
45
46 ListViewPwM * getLv()
47 { return lv; }
48 CommentBox * getCommentBox()
49 { return commentBox; }
50
51 /** returns the currently selected category */
52 QString getCurrentCategory()
53 { return categoriesCombo->currentText(); }
54 /** add Category to the view */
55 void addCategory(const QString &cat)
56 { categoriesCombo->insertItem(cat); }
57 /** delete Category from view */
58 void delCategory(const QString &cat);
59 /** delete all categories from view */
60 void delAllCategories()
61 { categoriesCombo->clear(); }
62 /** select the specified category */
63 void selectCategory(const QString &cat);
64 /** returns the number of categories in this view.
65 * This value dosn't say anything about the number of
66 * categories in the document.
67 */
68 int numCategories()
69 { return categoriesCombo->count(); }
70 /** resize the view */
71 void resize(const QSize &size)
72 { vbox1->resize(size); }
73
74protected:
75 /** main list view */
76 ListViewPwM *lv;
77 /** categories combo-box */
78 QComboBox *categoriesCombo;
79 /** title string for the categories combo or list box */
80 QLabel *categoriesTitle;
81 /** hbox1 for widget style */
82 QHBox *hbox1;
83 /** vbox1 for widget style */
84 QVBox *vbox1;
85 /** splitter for commentTextEdit */
86 #ifndef PWM_EMBEDDED
87 QSplitter *splitter1;
88#else
89 KDGanttMinimizeSplitter * splitter1;
90#endif
91 /** push button to change the category name */
92 QPushButton *renCatButton;
93 /** push button to delete the category */
94 QPushButton *delCatButton;
95 /** comment box */
96 CommentBox *commentBox;
97};
98
99#endif