2 * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __DETECTWIDGET_H__
21 #define __DETECTWIDGET_H__
24 #include <kwindowsystem.h>
26 #include "../../rules.h"
31 #include "ui_detectwidget.h"
37 : public QWidget
, public Ui_DetectWidget
41 explicit DetectWidget( QWidget
* parent
= NULL
);
49 explicit DetectDialog( QWidget
* parent
= NULL
, const char* name
= NULL
);
50 void detect( WId window
);
51 QByteArray
selectedClass() const;
52 bool selectedWholeClass() const;
53 QByteArray
selectedRole() const;
54 bool selectedWholeApp() const;
55 NET::WindowType
selectedType() const;
56 QString
selectedTitle() const;
57 Rules::StringMatch
titleMatch() const;
58 QByteArray
selectedMachine() const;
59 const KWindowInfo
& windowInfo() const;
61 void detectionDone( bool );
63 virtual bool eventFilter( QObject
* o
, QEvent
* e
);
66 void readWindow( WId window
);
69 QByteArray wmclass_class
;
70 QByteArray wmclass_name
;
82 const KWindowInfo
& DetectDialog::windowInfo() const