00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef QLABCATEGORYLIST_H
00044 #define QLABCATEGORYLIST_H
00045
00046 #include <qvariant.h>
00047 #include <qwidgetplugin.h>
00048 #include <qlistview.h>
00049
00050 class QListViewItem ;
00051 class QSqlRecord ;
00052
00053 class QT_WIDGET_PLUGIN_EXPORT QlabCategoryList : public QListView
00054 {
00055 Q_OBJECT ;
00056 Q_PROPERTY( QString categoryType READ categoryType WRITE setCategoryType
00057 DESIGNABLE true SCRIPTABLE true STORED true ) ;
00058 Q_PROPERTY( bool showActive READ showActive WRITE setShowActive
00059 DESIGNABLE true SCRIPTABLE true STORED true ) ;
00060
00061 public:
00062 QlabCategoryList( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
00063 ~QlabCategoryList();
00064 int currentCategory() ;
00065
00066 public slots :
00067 QString categoryType() const ;
00068 void setCategoryType( const QString & type ) ;
00069 bool showActive() const ;
00070 void setShowActive( bool act ) ;
00071 void refresh() ;
00072 bool deleteCurrent() ;
00073 void reparent( int source, int newParent ) ;
00074 QSqlRecord * create() ;
00075 QSqlRecord * update() ;
00076 uint validateChanges() ;
00077
00078 signals:
00082 void categoryIdChanged( int catid ) ;
00089 void categoryRemapped( int catid ) ;
00090
00091 protected:
00092
00093 protected slots:
00094 virtual void languageChange();
00095
00096 private:
00097 void init();
00098
00099 QString catType ;
00100 bool active ;
00101 bool inInit ;
00104 QSqlRecord * buffer ;
00105 int activeModule ;
00107 private slots :
00108 void categoryChanged( QListViewItem * item ) ;
00109
00110 } ;
00111
00112 #endif // QLABCATEGORYLIST_H