ruleswidget.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __RULESWIDGET_H__
00021 #define __RULESWIDGET_H__
00022
00023 #include <kdialogbase.h>
00024 #include <kwin.h>
00025 #include <kshortcutdialog.h>
00026
00027 #include "ruleswidgetbase.h"
00028 #include "editshortcutbase.h"
00029
00030 namespace KWinInternal
00031 {
00032
00033 class Rules;
00034 class DetectDialog;
00035
00036 class RulesWidget
00037 : public RulesWidgetBase
00038 {
00039 Q_OBJECT
00040 public:
00041 RulesWidget( QWidget* parent = NULL, const char* name = NULL );
00042 void setRules( Rules* r );
00043 Rules* rules() const;
00044 bool finalCheck();
00045 void prepareWindowSpecific( WId window );
00046 signals:
00047 void changed( bool state );
00048 protected slots:
00049 virtual void detectClicked();
00050 virtual void wmclassMatchChanged();
00051 virtual void roleMatchChanged();
00052 virtual void titleMatchChanged();
00053 virtual void extraMatchChanged();
00054 virtual void machineMatchChanged();
00055 virtual void shortcutEditClicked();
00056 private slots:
00057
00058 void updateEnableposition();
00059 void updateEnablesize();
00060 void updateEnabledesktop();
00061 void updateEnablemaximizehoriz();
00062 void updateEnablemaximizevert();
00063 void updateEnableminimize();
00064 void updateEnableshade();
00065 void updateEnablefullscreen();
00066 void updateEnableplacement();
00067
00068 void updateEnableabove();
00069 void updateEnablebelow();
00070 void updateEnablenoborder();
00071 void updateEnableskiptaskbar();
00072 void updateEnableskippager();
00073 void updateEnableacceptfocus();
00074 void updateEnablecloseable();
00075 void updateEnableopacityactive();
00076 void updateEnableopacityinactive();
00077
00078 void updateEnablefsplevel();
00079 void updateEnablemoveresizemode();
00080 void updateEnabletype();
00081 void updateEnableignoreposition();
00082 void updateEnableminsize();
00083 void updateEnablemaxsize();
00084 void updateEnablestrictgeometry();
00085 void updateEnableshortcut();
00086
00087 void detected( bool );
00088 private:
00089 int desktopToCombo( int d ) const;
00090 int comboToDesktop( int val ) const;
00091 void prefillUnusedValues( const KWin::WindowInfo& info );
00092 DetectDialog* detect_dlg;
00093 bool detect_dlg_ok;
00094 };
00095
00096 class RulesDialog
00097 : public KDialogBase
00098 {
00099 Q_OBJECT
00100 public:
00101 RulesDialog( QWidget* parent = NULL, const char* name = NULL );
00102 Rules* edit( Rules* r, WId window );
00103 protected:
00104 virtual void accept();
00105 private:
00106 RulesWidget* widget;
00107 Rules* rules;
00108 };
00109
00110 class EditShortcut
00111 : public EditShortcutBase
00112 {
00113 Q_OBJECT
00114 public:
00115 EditShortcut( QWidget* parent = NULL, const char* name = NULL );
00116 protected:
00117 void editShortcut();
00118 void clearShortcut();
00119 };
00120
00121 class EditShortcutDialog
00122 : public KDialogBase
00123 {
00124 Q_OBJECT
00125 public:
00126 EditShortcutDialog( QWidget* parent = NULL, const char* name = NULL );
00127 void setShortcut( const QString& cut );
00128 QString shortcut() const;
00129 private:
00130 EditShortcut* widget;
00131 };
00132
00133
00134 class ShortcutDialog
00135 : public KShortcutDialog
00136 {
00137 Q_OBJECT
00138 public:
00139 ShortcutDialog( const KShortcut& cut, QWidget* parent = NULL, const char* name = NULL );
00140 virtual void accept();
00141 };
00142
00143 }
00144
00145 #endif
This file is part of the documentation for kwin Library Version 3.4.1.