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