kwin Library API Documentation

ruleswidget.h

00001 /*
00002  * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 
00020 #ifndef __RULESWIDGET_H__
00021 #define __RULESWIDGET_H__
00022 
00023 #include <kdialogbase.h>
00024 #include <kwin.h>
00025 
00026 #include "ruleswidgetbase.h"
00027 
00028 namespace KWinInternal
00029 {
00030 
00031 class Rules;
00032 class DetectDialog;
00033 
00034 class RulesWidget
00035     : public RulesWidgetBase
00036     {
00037     Q_OBJECT
00038     public:
00039         RulesWidget( QWidget* parent = NULL, const char* name = NULL );
00040         void setRules( Rules* r );
00041         Rules* rules() const;
00042         bool finalCheck();
00043         void prepareWindowSpecific( WId window );
00044     signals:
00045         void changed( bool state );
00046     protected slots:
00047         virtual void detectClicked();
00048         virtual void wmclassMatchChanged();
00049         virtual void roleMatchChanged();
00050         virtual void titleMatchChanged();
00051         virtual void extraMatchChanged();
00052         virtual void machineMatchChanged();
00053     private slots:
00054         // geometry tab
00055         void updateEnableposition();
00056         void updateEnablesize();
00057         void updateEnabledesktop();
00058         void updateEnablemaximizehoriz();
00059         void updateEnablemaximizevert();
00060         void updateEnableminimize();
00061         void updateEnableshade();
00062         void updateEnablefullscreen();
00063         void updateEnableplacement();
00064         // preferences tab
00065         void updateEnableabove();
00066         void updateEnablebelow();
00067         void updateEnablenoborder();
00068         void updateEnableskiptaskbar();
00069         void updateEnableskippager();
00070         void updateEnableacceptfocus();
00071         void updateEnablecloseable();
00072         // workarounds tab
00073         void updateEnablefsplevel();
00074         void updateEnablemoveresizemode();
00075         void updateEnabletype();
00076         void updateEnableignoreposition();
00077         void updateEnableminsize();
00078         void updateEnablemaxsize();
00079         // internal
00080         void detected( bool );
00081     private:
00082         void prefillUnusedValues( const KWin::WindowInfo& info );
00083         DetectDialog* detect_dlg;
00084         bool detect_dlg_ok;
00085     };
00086 
00087 class RulesDialog
00088     : public KDialogBase
00089     {
00090     Q_OBJECT
00091     public:
00092         RulesDialog( QWidget* parent = NULL, const char* name = NULL );
00093         Rules* edit( Rules* r, WId window );
00094     protected:
00095         virtual void accept();
00096     private:
00097         RulesWidget* widget;
00098         Rules* rules;
00099     };
00100 
00101 } // namespace
00102 
00103 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 11:21:59 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003