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
class QSignalMapper;
00031
00032
namespace KParts {
class Part; }
00033
00034
namespace Kontact
00035 {
00036
00037
class Core;
00038
class Plugin;
00039
00044 class EntryItem :
public QListBoxItem
00045 {
00046
public:
00047
EntryItem(
QListBox *,
Kontact::Plugin * );
00048 ~
EntryItem();
00049
00050
Kontact::Plugin *plugin()
const {
return mPlugin; }
00051
00052
const QPixmap *pixmap()
const {
return &mPixmap; }
00053
00057
virtual int width(
const QListBox * )
const;
00061
virtual int height(
const QListBox * )
const;
00062
00063
protected:
00064
virtual void paint(
QPainter *p );
00065
00066
private:
00067
Kontact::Plugin *mPlugin;
00068
QPixmap mPixmap;
00069 };
00070
00074 class Navigator :
public KListBox
00075 {
00076 Q_OBJECT
00077
public:
00078
Navigator( SidePaneBase *parent = 0,
const char *name = 0 );
00079
00080
virtual void setSelected(
QListBoxItem *,
bool );
00081
00082
void updatePlugins(
QValueList<Kontact::Plugin*> plugins );
00083
00084
QSize sizeHint()
const;
00085
00086 signals:
00087
void pluginActivated(
Kontact::Plugin * );
00088
00089
protected:
00090
void dragEnterEvent(
QDragEnterEvent * );
00091
void dragMoveEvent (
QDragMoveEvent * );
00092
void dropEvent(
QDropEvent * );
00093
void resizeEvent(
QResizeEvent * );
00094
00095
private slots:
00096
void slotExecuted(
QListBoxItem *item );
00097
void shortCutSelected(
int );
00098
00099
private:
00100 SidePaneBase *mSidePane;
00101
00102
QSignalMapper *mMapper;
00103
QPtrList<KAction> mActions;
00104 };
00105
00106
class IconSidePane :
public SidePaneBase
00107 {
00108 Q_OBJECT
00109
public:
00110 IconSidePane(
Core *core,
QWidget *parent,
const char *name = 0 );
00111 ~IconSidePane();
00112
00113
public slots:
00114
virtual void updatePlugins();
00115
virtual void selectPlugin(
Kontact::Plugin* );
00116
virtual void selectPlugin(
const QString &name );
00117
00118
private:
00119
Navigator *mNavigator;
00120 };
00121
00122 }
00123
00124
#endif
This file is part of the documentation for kontact Library Version 3.3.0.