You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.3 KiB
87 lines
2.3 KiB
15 years ago
|
/*
|
||
|
* Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation; either version 2 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with this program; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
|
||
|
#ifndef __DETECTWIDGET_H__
|
||
|
#define __DETECTWIDGET_H__
|
||
|
|
||
|
#include "detectwidgetbase.h"
|
||
|
|
||
|
#include <kdialogbase.h>
|
||
13 years ago
|
#include <twin.h>
|
||
15 years ago
|
|
||
|
#include "../../rules.h"
|
||
|
|
||
|
namespace KWinInternal
|
||
|
{
|
||
|
|
||
|
class DetectWidget
|
||
|
: public DetectWidgetBase
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
15 years ago
|
DetectWidget( TQWidget* parent = NULL, const char* name = NULL );
|
||
15 years ago
|
};
|
||
|
|
||
|
class DetectDialog
|
||
|
: public KDialogBase
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
15 years ago
|
DetectDialog( TQWidget* parent = NULL, const char* name = NULL );
|
||
15 years ago
|
void detect( WId window );
|
||
15 years ago
|
TQCString selectedClass() const;
|
||
15 years ago
|
bool selectedWholeClass() const;
|
||
15 years ago
|
TQCString selectedRole() const;
|
||
15 years ago
|
bool selectedWholeApp() const;
|
||
|
NET::WindowType selectedType() const;
|
||
15 years ago
|
TQString selectedTitle() const;
|
||
15 years ago
|
Rules::StringMatch titleMatch() const;
|
||
15 years ago
|
TQCString selectedMachine() const;
|
||
15 years ago
|
const KWin::WindowInfo& windowInfo() const;
|
||
|
signals:
|
||
|
void detectionDone( bool );
|
||
|
protected:
|
||
15 years ago
|
virtual bool eventFilter( TQObject* o, TQEvent* e );
|
||
15 years ago
|
private:
|
||
|
void selectWindow();
|
||
|
void readWindow( WId window );
|
||
|
void executeDialog();
|
||
|
WId findWindow();
|
||
15 years ago
|
TQCString wmclass_class;
|
||
|
TQCString wmclass_name;
|
||
|
TQCString role;
|
||
15 years ago
|
NET::WindowType type;
|
||
15 years ago
|
TQString title;
|
||
|
TQCString extrarole;
|
||
|
TQCString machine;
|
||
15 years ago
|
DetectWidget* widget;
|
||
15 years ago
|
TQDialog* grabber;
|
||
15 years ago
|
KWin::WindowInfo info;
|
||
|
};
|
||
|
|
||
|
inline
|
||
|
const KWin::WindowInfo& DetectDialog::windowInfo() const
|
||
|
{
|
||
|
return info;
|
||
|
}
|
||
|
|
||
|
} // namespace
|
||
|
|
||
|
#endif
|