iconsidepane.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KONTACT_ICONSIDEPANEBASE_H
00022 #define KONTACT_ICONSIDEPANEBASE_H
00023
00024 #include "sidepanebase.h"
00025
00026 #include <klistbox.h>
00027
00028 #include <qlistbox.h>
00029
00030 namespace KParts { class Part; }
00031
00032 namespace Kontact
00033 {
00034
00035 class Core;
00036 class Plugin;
00037
00042 class EntryItem : public QListBoxItem
00043 {
00044 public:
00045 EntryItem( QListBox *, Kontact::Plugin * );
00046 ~EntryItem();
00047
00048 Kontact::Plugin *plugin() const { return mPlugin; }
00049
00050 const QPixmap *pixmap() const { return &mPixmap; }
00051
00055 virtual int width( const QListBox * ) const;
00059 virtual int height( const QListBox * ) const;
00060
00061 protected:
00062 virtual void paint( QPainter *p );
00063
00064 private:
00065 Kontact::Plugin *mPlugin;
00066 QPixmap mPixmap;
00067 };
00068
00072 class Navigator : public KListBox
00073 {
00074 Q_OBJECT
00075 public:
00076 Navigator( SidePaneBase *parent = 0, const char *name = 0 );
00077
00078 virtual void setSelected( QListBoxItem *, bool );
00079
00080 void updatePlugins( QValueList<Kontact::Plugin*> plugins );
00081
00082 QSize sizeHint() const;
00083
00084 signals:
00085 void pluginActivated( Kontact::Plugin * );
00086
00087 protected:
00088 void dragEnterEvent( QDragEnterEvent * );
00089 void dragMoveEvent ( QDragMoveEvent * );
00090 void dropEvent( QDropEvent * );
00091 void resizeEvent( QResizeEvent * );
00092
00093 private slots:
00094 void slotExecuted( QListBoxItem *item );
00095
00096 private:
00097 SidePaneBase *mSidePane;
00098 };
00099
00100 class IconSidePane : public SidePaneBase
00101 {
00102 Q_OBJECT
00103 public:
00104 IconSidePane( Core *core, QWidget *parent, const char *name = 0 );
00105 ~IconSidePane();
00106
00107 public slots:
00108 virtual void updatePlugins();
00109 virtual void selectPlugin( Kontact::Plugin* );
00110 virtual void selectPlugin( const QString &name );
00111
00112 private:
00113 Navigator *mNavigator;
00114 };
00115
00116 }
00117
00118 #endif
This file is part of the documentation for kontact Library Version 3.2.2.