kwindecoration.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef KWINDECORATION_H
00033 #define KWINDECORATION_H
00034
00035 #include <kcmodule.h>
00036 #include <dcopobject.h>
00037 #include <buttons.h>
00038 #include <kconfig.h>
00039 #include <klibloader.h>
00040
00041 #include <kdecoration.h>
00042
00043 #include "kwindecorationIface.h"
00044
00045 class KComboBox;
00046 class QCheckBox;
00047 class QLabel;
00048 class QTabWidget;
00049 class QVBox;
00050 class QSlider;
00051
00052 class KDecorationPlugins;
00053 class KDecorationPreview;
00054
00055
00056 struct DecorationInfo
00057 {
00058 QString name;
00059 QString libraryName;
00060 };
00061
00062
00063 class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface, public KDecorationDefines
00064 {
00065 Q_OBJECT
00066
00067 public:
00068 KWinDecorationModule(QWidget* parent, const char* name, const QStringList &);
00069 ~KWinDecorationModule();
00070
00071 virtual void load();
00072 virtual void save();
00073 virtual void defaults();
00074
00075 QString quickHelp() const;
00076 const KAboutData* aboutData() const;
00077
00078 virtual void dcopUpdateClientList();
00079
00080 signals:
00081 void pluginLoad( KConfig* conf );
00082 void pluginSave( KConfig* conf );
00083 void pluginDefaults();
00084
00085 protected slots:
00086
00087 void slotSelectionChanged();
00088 void slotChangeDecoration( const QString & );
00089 void slotBorderChanged( int );
00090
00091 private:
00092 void readConfig( KConfig* conf );
00093 void writeConfig( KConfig* conf );
00094 void findDecorations();
00095 void createDecorationList();
00096 void updateSelection();
00097 QString decorationLibName( const QString& name );
00098 QString decorationName ( QString& libName );
00099 static QString styleToConfigLib( QString& styleLib );
00100 void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
00101 void resetKWin();
00102 void checkSupportedBorderSizes();
00103 static int borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes );
00104 static BorderSize indexToBorderSize( int index, QValueList< BorderSize > sizes );
00105
00106 QTabWidget* tabWidget;
00107
00108
00109 KComboBox* decorationList;
00110 QValueList<DecorationInfo> decorations;
00111
00112 KDecorationPreview* preview;
00113 KDecorationPlugins* plugins;
00114 KConfig kwinConfig;
00115
00116 QCheckBox* cbUseCustomButtonPositions;
00117
00118 QCheckBox* cbShowToolTips;
00119 QLabel* lBorder;
00120 QSlider* slBorder;
00121 BorderSize border_size;
00122
00123 QObject* pluginObject;
00124 QGroupBox* pluginSettingsGrp;
00125 QWidget* pluginConfigWidget;
00126 QString currentLibraryName;
00127 QString oldLibraryName;
00128 QObject* (*allocatePlugin)( KConfig* conf, QWidget* parent );
00129
00130
00131 ButtonDropSite* dropSite;
00132 ButtonSource* buttonSource;
00133 QGroupBox* buttonBox;
00134 QVBox* buttonPage;
00135 };
00136
00137
00138 #endif
00139
This file is part of the documentation for kwin Library Version 3.2.2.