author | ulf69 <ulf69> | 2004-09-15 17:53:22 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-15 17:53:22 (UTC) |
commit | d3925ba5bd25224bc4a60d3d6a107c464994a1ea (patch) (side-by-side diff) | |
tree | 60f69da1d2b79ee3081e7ef5c09a46470ca6eda0 /pwmanager/pwmanager/pwmviewstyle.h | |
parent | ce83a3479d23b9e8a59c745ccd0a0b14f64ef4e8 (diff) | |
download | kdepimpi-d3925ba5bd25224bc4a60d3d6a107c464994a1ea.zip kdepimpi-d3925ba5bd25224bc4a60d3d6a107c464994a1ea.tar.gz kdepimpi-d3925ba5bd25224bc4a60d3d6a107c464994a1ea.tar.bz2 |
initial revision
Diffstat (limited to 'pwmanager/pwmanager/pwmviewstyle.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmviewstyle.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmviewstyle.h b/pwmanager/pwmanager/pwmviewstyle.h new file mode 100644 index 0000000..bf5ce91 --- a/dev/null +++ b/pwmanager/pwmanager/pwmviewstyle.h @@ -0,0 +1,108 @@ +/*************************************************************************** + * * + * copyright (C) 2004 by Michael Buesch * + * email: mbuesch@freenet.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License version 2 * + * as published by the Free Software Foundation. * + * * + ***************************************************************************/ + + +/*************************************************************************** + * copyright (C) 2004 by Ulf Schenk + * This file is originaly based on version 1.0.1 of pwmanager + * and was modified to run on embedded devices that run microkde + * + * $Id$ + **************************************************************************/ + +#ifndef PWMVIEWSTYLE_H +#define PWMVIEWSTYLE_H + +#include <qwidget.h> +#include <qsplitter.h> +#include <qhbox.h> +#include <qvbox.h> +#include <qpushbutton.h> +#include <qpopupmenu.h> +#ifndef PWM_EMBEDDED +#include <qtextedit.h> +#else +#include <qmultilineedit.h> +#endif + +#include <qlabel.h> +#include <qlistbox.h> +#include <qcombobox.h> +#include <qsize.h> + +class ListViewPwM; +class PwMViewStyle_0; +class PwMViewStyle_1; +class PwMView; +class CommentBox; + +class PwMViewStyle : public QWidget +{ + Q_OBJECT + +public: + enum style_t + { + style_notset = -1, + style_0 = 0, + style_1 = 1 + }; + +public: + PwMViewStyle(QWidget *parent = 0, const char *name = 0); + ~PwMViewStyle(); + + /** initialize a new style */ + void initStyle(style_t style); + void initStyle(int style) + { initStyle(static_cast<style_t>(style)); } + /** returns the currently used style */ + style_t getCurStyle() + { return curStyle; } + void setView(PwMView *view) + { v = view; } + + /** returns the currently selected category */ + QString getCurrentCategory(); + +protected: + /** add Category to the view */ + void addCategory(const QString &cat); + /** delete Category from view */ + void delCategory(const QString &cat); + /** delete all categories from view */ + void delAllCategories(); + /** select the specified category */ + void selectCategory(const QString &cat); + /** returns the number of categories in this view. + * This value dosn't say anything about the number of + * categories in the document. + */ + int numCategories(); + /** resize the view */ + void resizeView(const QSize &size); + +private: + /** which style has the view? + * KListBox on the left, + * or QComboBox on the top? + */ + style_t curStyle; + + PwMViewStyle_0 *s0; + PwMViewStyle_1 *s1; + PwMView *v; + +protected: + ListViewPwM *lv; + CommentBox *commentBox; +}; +#endif |