-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathNewPluginsDialog.h
86 lines (68 loc) · 2.22 KB
/
NewPluginsDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//-----------------------------------------------------------------------------
// File: NewPluginsDialog.h
//-----------------------------------------------------------------------------
// Project: Kactus 2
// Author: Esko Pekkarinen
// Date: 14.1.2014
//
// Description:
// Dialog for displaying new plugins.
//-----------------------------------------------------------------------------
#ifndef NEWPLUGINSDIALOG_H
#define NEWPLUGINSDIALOG_H
#include <QListWidget>
#include <QDialog>
#include <QStackedWidget>
#include <QDialogButtonBox>
class PluginManager;
class IPlugin;
//-----------------------------------------------------------------------------
//! Plugin list dialog.
//-----------------------------------------------------------------------------
class NewPluginsDialog : public QDialog
{
Q_OBJECT
public:
/*!
* Constructor.
*
* @param [in] parent The parent widget.
*/
NewPluginsDialog(QWidget* parent);
/*!
* Destructor.
*/
virtual ~NewPluginsDialog() = default;
//! Disable copying.
NewPluginsDialog(NewPluginsDialog const& rhs) = delete;
NewPluginsDialog& operator=(NewPluginsDialog const& rhs) = delete;
/*!
* Adds a plugin to the plugin list.
*
* @param [in] plugin The plugin to add.
*/
void addPlugin(IPlugin* plugin);
/*!
* Adds plugins to the plugin list.
*
* @param [in] plugins The plugins to add.
*/
void addPlugins(QList<IPlugin*> plugins);
private slots:
//! Called when the plugin selection has changed.
void selectionChanged();
private:
//! Sets the widget layout.
void setupLayout();
//-----------------------------------------------------------------------------
// Data.
//-----------------------------------------------------------------------------
//! Plugins list widget.
QListWidget pluginsList_;
//! Stack for displaying information of the selected plugin.
QStackedWidget detailsStack_;
//! Button box.
QDialogButtonBox buttonBox_;
};
//-----------------------------------------------------------------------------
#endif // NEWPLUGINSDIALOG_H