00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _KSERVICELISTWIDGET_H
00022 #define _KSERVICELISTWIDGET_H
00023
00024 #include <tqgroupbox.h>
00025 #include <tqlistbox.h>
00026 class TypesListItem;
00027 class TQLineEdit;
00028 class TQPushButton;
00029 class KService;
00030
00031 class KServiceListItem : public QListBoxText
00032 {
00033 public:
00034 KServiceListItem( KService *pService, int kind );
00035 bool isImmutable();
00036 TQString desktopPath;
00037 TQString localPath;
00038 };
00039
00046 class KServiceListWidget : public QGroupBox
00047 {
00048 Q_OBJECT
00049 public:
00050 enum { SERVICELIST_APPLICATIONS, SERVICELIST_SERVICES };
00051 KServiceListWidget(int kind, TQWidget *parent = 0, const char *name = 0);
00052
00053 void setTypeItem( TypesListItem * item );
00054
00055 signals:
00056 void changed(bool);
00057
00058 protected slots:
00059 void promoteService();
00060 void demoteService();
00061 void addService();
00062 void editService();
00063 void removeService();
00064 void enableMoveButtons(int index);
00065
00066 protected:
00067 void updatePreferredServices();
00068
00069 private:
00070 int m_kind;
00071 TQListBox *servicesLB;
00072 TQPushButton *servUpButton, *servDownButton;
00073 TQPushButton *servNewButton, *servEditButton, *servRemoveButton;
00074 TypesListItem *m_item;
00075 };
00076
00077 #endif