detectwidget.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __DETECTWIDGET_H__
00021 #define __DETECTWIDGET_H__
00022
00023 #include "detectwidgetbase.h"
00024
00025 #include <kdialogbase.h>
00026 #include <kwin.h>
00027
00028 #include "../../rules.h"
00029
00030 namespace KWinInternal
00031 {
00032
00033 class DetectWidget
00034 : public DetectWidgetBase
00035 {
00036 Q_OBJECT
00037 public:
00038 DetectWidget( QWidget* parent = NULL, const char* name = NULL );
00039 };
00040
00041 class DetectDialog
00042 : public KDialogBase
00043 {
00044 Q_OBJECT
00045 public:
00046 DetectDialog( QWidget* parent = NULL, const char* name = NULL );
00047 void detect( WId window );
00048 QCString selectedClass() const;
00049 bool selectedWholeClass() const;
00050 QCString selectedRole() const;
00051 bool selectedWholeApp() const;
00052 NET::WindowType selectedType() const;
00053 QString selectedTitle() const;
00054 Rules::StringMatch titleMatch() const;
00055 QCString selectedMachine() const;
00056 const KWin::WindowInfo& windowInfo() const;
00057 signals:
00058 void detectionDone( bool );
00059 protected:
00060 virtual bool eventFilter( QObject* o, QEvent* e );
00061 private:
00062 void selectWindow();
00063 void readWindow( WId window );
00064 void executeDialog();
00065 WId findWindow();
00066 QCString wmclass_class;
00067 QCString wmclass_name;
00068 QCString role;
00069 NET::WindowType type;
00070 QString title;
00071 QCString extrarole;
00072 QCString machine;
00073 DetectWidget* widget;
00074 QDialog* grabber;
00075 KWin::WindowInfo info;
00076 };
00077
00078 inline
00079 const KWin::WindowInfo& DetectDialog::windowInfo() const
00080 {
00081 return info;
00082 }
00083
00084 }
00085
00086 #endif
This file is part of the documentation for kwin Library Version 3.3.90.