Cppcheck
applicationdialog.h
Go to the documentation of this file.
1 /*
2  * Cppcheck - A tool for static C/C++ code analysis
3  * Copyright (C) 2007-2023 Cppcheck team.
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 APPLICATIONDIALOG_H
20 #define APPLICATIONDIALOG_H
21 
22 #include <QDialog>
23 #include <QObject>
24 #include <QString>
25 
26 class QWidget;
27 class Application;
28 namespace Ui {
29  class ApplicationDialog;
30 }
31 
32 /// @addtogroup GUI
33 /// @{
34 
35 /**
36  * @brief Dialog to edit a startable application.
37  * User can open errors with user specified applications. This is a dialog
38  * to modify/add an application to open errors with.
39  *
40  */
41 class ApplicationDialog : public QDialog {
42  Q_OBJECT
43 
44 public:
45  /**
46  * @brief Constructor.
47  * @param title Title for the dialog.
48  * @param app Application definition.
49  * @param parent Parent widget.
50  */
51  ApplicationDialog(const QString &title,
52  Application &app,
53  QWidget *parent = nullptr);
54  ~ApplicationDialog() override;
55 
56 protected slots:
57 
58  void ok();
59 
60  /**
61  * @brief Slot to browse for an application
62  *
63  */
64  void browse();
65 
66 protected:
67 
68  /**
69  * @brief UI from the Qt designer
70  *
71  */
72  Ui::ApplicationDialog* mUI;
73 
74 private:
75 
76  /**
77  * @brief Underlying Application
78  */
80 };
81 /// @}
82 #endif // APPLICATIONDIALOG_H
Dialog to edit a startable application.
Ui::ApplicationDialog * mUI
UI from the Qt designer.
ApplicationDialog(const QString &title, Application &app, QWidget *parent=nullptr)
Constructor.
void browse()
Slot to browse for an application.
~ApplicationDialog() override
Application & mApplication
Underlying Application.
A class containing information of the application to execute.
Definition: application.h:43
Definition: aboutdialog.h:27