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 <qstringlist.h>
00033
00034 class QDragEnterEvent;
00035 class QDragMoveEvent;
00036 class QDropEvent;
00037 class QPoint;
00038
00039 namespace KABC {
00040 class DistributionListManager;
00041 }
00042
00043 namespace KAB {
00044 namespace DistributionListNg {
00045
00046 class ListBox : public KListBox
00047 {
00048 Q_OBJECT
00049 public:
00050 ListBox( QWidget* parent = 0 );
00051
00052 signals:
00053
00054 void dropped( const QString &listName, const KABC::Addressee::List &addressees );
00055
00056 protected:
00057
00058 void dragEnterEvent( QDragEnterEvent *event );
00059
00060 void dragMoveEvent( QDragMoveEvent *event );
00061
00062 void dropEvent( QDropEvent *event );
00063 };
00064
00065 class MainWidget : public KAB::ExtensionWidget
00066 {
00067 Q_OBJECT
00068
00069 public:
00070 explicit MainWidget( KAB::Core *core, QWidget *parent = 0, const char *name = 0 );
00071
00072
00073 QString title() const;
00074
00075
00076 QString identifier() const;
00077
00078
00079 private:
00080 void changed( const KABC::Addressee& );
00081
00082 private slots:
00083
00084 void deleteSelectedDistributionList();
00085 void editSelectedDistributionList();
00086
00087 void contextMenuRequested( QListBoxItem *item, const QPoint &point );
00088 void updateEntries();
00089 void itemSelected( int index );
00090 void contactsDropped( const QString &listName, const KABC::Addressee::List &addressees );
00091
00092 private:
00093 ListBox *mListBox;
00094 QStringList mCurrentEntries;
00095 };
00096
00097 }
00098 }
00099
00100 #endif // KAB_DISTRIBUTIONLISTNG_MAINWIDGET_H
|