AntiMicroX
capturedwindowinfodialog.h
Go to the documentation of this file.
1 /* antimicrox Gamepad to KB+M event mapper
2  * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3  * Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9 
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14 
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef UNIXWINDOWINFODIALOG_H
20 #define UNIXWINDOWINFODIALOG_H
21 
22 #include <QDialog>
23 
24 class QWidget;
25 
26 namespace Ui {
28 }
29 
30 class CapturedWindowInfoDialog : public QDialog
31 {
32  Q_OBJECT
33 
34  public:
35 #ifdef Q_OS_WIN
36  explicit CapturedWindowInfoDialog(QWidget *parent = 0);
37 #else
38  explicit CapturedWindowInfoDialog(long window, QWidget *parent = nullptr);
39 #endif
41 
42  enum
43  {
45  WindowClass = (1 << 0),
46  WindowName = (1 << 1),
47  WindowPath = (1 << 2),
48  };
49  typedef int CapturedWindowOption;
50 
51  QString getWindowClass();
52  QString getWindowName();
53  QString getWindowPath();
54  bool useFullWindowPath();
56 
57  private:
58  Ui::CapturedWindowInfoDialog *ui;
59 
61 
62  QString winClass;
63  QString winName;
64  QString winPath;
66 
67  private slots:
68  void populateOption();
69 };
70 
71 #endif // UNIXWINDOWINFODIALOG_H
CapturedWindowInfoDialog::selectedMatch
CapturedWindowOption selectedMatch
Definition: capturedwindowinfodialog.h:60
x11extras.h
CapturedWindowInfoDialog::~CapturedWindowInfoDialog
~CapturedWindowInfoDialog()
Definition: capturedwindowinfodialog.cpp:145
X11Extras::getWindowClass
QString getWindowClass(Window window)
Definition: x11extras.cpp:536
CapturedWindowInfoDialog::winClass
QString winClass
Definition: capturedwindowinfodialog.h:62
capturedwindowinfodialog.h
CapturedWindowInfoDialog::WindowClass
@ WindowClass
Definition: capturedwindowinfodialog.h:45
X11Extras::getApplicationLocation
QString getApplicationLocation(int pid)
Find the application file location for a given PID.
Definition: x11extras.cpp:336
CapturedWindowInfoDialog::CapturedWindowOption
int CapturedWindowOption
Definition: capturedwindowinfodialog.h:49
WinExtras::getCurrentWindowText
static QString getCurrentWindowText()
Get the window text of the window currently in focus.
Definition: winextras.cpp:458
winextras.h
CapturedWindowInfoDialog::winPath
QString winPath
Definition: capturedwindowinfodialog.h:64
CapturedWindowInfoDialog::winName
QString winName
Definition: capturedwindowinfodialog.h:63
CapturedWindowInfoDialog::WindowPath
@ WindowPath
Definition: capturedwindowinfodialog.h:47
CapturedWindowInfoDialog::ui
Ui::CapturedWindowInfoDialog * ui
Definition: capturedwindowinfodialog.h:58
Ui
Definition: aboutdialog.h:26
WinExtras::getForegroundWindowExePath
static QString getForegroundWindowExePath()
Check foreground window (window in focus) and obtain the corresponding exe file path.
Definition: winextras.cpp:248
CapturedWindowInfoDialog
Definition: capturedwindowinfodialog.h:30
CapturedWindowInfoDialog::WindowNone
@ WindowNone
Definition: capturedwindowinfodialog.h:44
CapturedWindowInfoDialog::getWindowClass
QString getWindowClass()
Definition: capturedwindowinfodialog.cpp:168
CapturedWindowInfoDialog::useFullWindowPath
bool useFullWindowPath()
Definition: capturedwindowinfodialog.cpp:174
CapturedWindowInfoDialog::CapturedWindowInfoDialog
CapturedWindowInfoDialog(long window, QWidget *parent=nullptr)
Definition: capturedwindowinfodialog.cpp:35
CapturedWindowInfoDialog::fullWinPath
bool fullWinPath
Definition: capturedwindowinfodialog.h:65
CapturedWindowInfoDialog::getWindowPath
QString getWindowPath()
Definition: capturedwindowinfodialog.cpp:172
CapturedWindowInfoDialog::populateOption
void populateOption()
Definition: capturedwindowinfodialog.cpp:147
CapturedWindowInfoDialog::getSelectedOptions
CapturedWindowOption getSelectedOptions()
Definition: capturedwindowinfodialog.cpp:166
X11Extras::getInstance
static X11Extras * getInstance()
Definition: x11extras.cpp:73
CapturedWindowInfoDialog::WindowName
@ WindowName
Definition: capturedwindowinfodialog.h:46
X11Extras::getApplicationPid
int getApplicationPid(Window window)
Check window and any parents for the window property "_NET_WM_PID".
Definition: x11extras.cpp:243
CapturedWindowInfoDialog::getWindowName
QString getWindowName()
Definition: capturedwindowinfodialog.cpp:170
X11Extras
Definition: x11extras.h:29
X11Extras::getWindowTitle
QString getWindowTitle(Window window)
Definition: x11extras.cpp:486