kaddressbook
distributionlistngwidget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KAB_DISTRIBUTIONLISTNG_MAINWIDGET_H
00024 #define KAB_DISTRIBUTIONLISTNG_MAINWIDGET_H
00025
00026 #include "extensionwidget.h"
00027
00028 #include <kabc/addressee.h>
00029
00030 #include <klistbox.h>
00031
00032 #include <tqstringlist.h>
00033
00034 class TQDragEnterEvent;
00035 class TQDragMoveEvent;
00036 class TQDropEvent;
00037 class TQPoint;
00038 class TQPushButton;
00039
00040 namespace KABC {
00041 class DistributionListManager;
00042 }
00043
00044 namespace KAB {
00045 namespace DistributionListNg {
00046
00047 class ListBox : public KListBox
00048 {
00049 Q_OBJECT
00050 public:
00051 ListBox( TQWidget* parent = 0 );
00052
00053 signals:
00054
00055 void dropped( const TQString &listName, const KABC::Addressee::List &addressees );
00056
00057 protected:
00058
00059 void dragEnterEvent( TQDragEnterEvent *event );
00060
00061 void dragMoveEvent( TQDragMoveEvent *event );
00062
00063 void dropEvent( TQDropEvent *event );
00064 };
00065
00066 class MainWidget : public KAB::ExtensionWidget
00067 {
00068 Q_OBJECT
00069
00070 public:
00071 explicit MainWidget( KAB::Core *core, TQWidget *parent = 0, const char *name = 0 );
00072
00073
00074 TQString title() const;
00075
00076
00077 TQString identifier() const;
00078
00079
00080 private:
00081 void changed( const KABC::Addressee& );
00082
00083 private slots:
00084
00085 void deleteSelectedDistributionList();
00086 void editSelectedDistributionList();
00087
00088 void contextMenuRequested( TQListBoxItem *item, const TQPoint &point );
00089 void updateEntries();
00090 void itemSelected( int index );
00091 void contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees );
00092
00093 private:
00094 ListBox *mListBox;
00095 TQStringList mCurrentEntries;
00096 TQPushButton *mAddButton;
00097 TQPushButton *mEditButton;
00098 TQPushButton *mRemoveButton;
00099 };
00100
00101 }
00102 }
00103
00104 #endif // KAB_DISTRIBUTIONLISTNG_MAINWIDGET_H
|