00001
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 <tdeabc/addressee.h>
00029
00030 #include <tdelistbox.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 TDEABC {
00041 class DistributionListManager;
00042 }
00043
00044 namespace KAB {
00045 namespace DistributionListNg {
00046
00047 class ListBox : public TDEListBox
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 ListBox( TQWidget* parent = 0 );
00053
00054 signals:
00055
00056 void dropped( const TQString &listName, const TDEABC::Addressee::List &addressees );
00057
00058 protected:
00059
00060 void dragEnterEvent( TQDragEnterEvent *event );
00061
00062 void dragMoveEvent( TQDragMoveEvent *event );
00063
00064 void dropEvent( TQDropEvent *event );
00065 };
00066
00067 class MainWidget : public KAB::ExtensionWidget
00068 {
00069 Q_OBJECT
00070
00071
00072 public:
00073 explicit MainWidget( KAB::Core *core, TQWidget *parent = 0, const char *name = 0 );
00074
00075
00076 TQString title() const;
00077
00078
00079 TQString identifier() const;
00080
00081
00082 private:
00083 void changed( const TDEABC::Addressee& );
00084
00085 private slots:
00086
00087 void deleteSelectedDistributionList();
00088 void editSelectedDistributionList();
00089
00090 void contextMenuRequested( TQListBoxItem *item, const TQPoint &point );
00091 void updateEntries();
00092 void itemSelected( int index );
00093 void contactsDropped( const TQString &listName, const TDEABC::Addressee::List &addressees );
00094
00095 private:
00096 ListBox *mListBox;
00097 TQStringList mCurrentEntries;
00098 TQPushButton *mAddButton;
00099 TQPushButton *mEditButton;
00100 TQPushButton *mRemoveButton;
00101 };
00102
00103 }
00104 }
00105
00106 #endif // KAB_DISTRIBUTIONLISTNG_MAINWIDGET_H