blob: cab9ce7b3215ec7654c8f5dfe127c0f76b7801c4 (
plain)
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
|
// Copyright 2021 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#ifndef MUMBLE_MUMBLE_PLUGINS_H_
#define MUMBLE_MUMBLE_PLUGINS_H_
#include "ConfigDialog.h"
#include "ui_PluginConfig.h"
#include "Plugin.h"
#include <QtCore/QObject>
#include <QtCore/QMutex>
#include <QtCore/QReadWriteLock>
struct PluginInfo;
class PluginConfig : public ConfigWidget, public Ui::PluginConfig {
private:
Q_OBJECT
Q_DISABLE_COPY(PluginConfig)
protected:
/// Clears and (re-) populates the plugin list in the UI with the currently available plugins
void refillPluginList();
/// @param item The QTreeWidgetItem to retrieve the plugin for
/// @returns The plugin corresponding to the provided item
const_plugin_ptr_t pluginForItem(QTreeWidgetItem *item) const;
public:
/// The unique name of this ConfigWidget
static const QString name;
/// Constructor
///
/// @param st The settings object to work on
PluginConfig(Settings &st);
/// @returns The title of this widget
virtual QString title() const Q_DECL_OVERRIDE;
/// @returns The name of this ConfigWidget
const QString &getName() const Q_DECL_OVERRIDE;
/// @returns The icon for this widget
virtual QIcon icon() const Q_DECL_OVERRIDE;
public slots:
/// Saves the current configuration to the respective settings object
void save() const Q_DECL_OVERRIDE;
/// Loads the transmit-position from the provided settings object
///
/// @param The setting sobject to read from
void load(const Settings &r) Q_DECL_OVERRIDE;
/// Slot triggered when the install-button in the UI has been clicked
void on_qpbInstallPlugin_clicked();
/// Slot triggered when the config-button in the UI has been clicked
void on_qpbConfig_clicked();
/// Slot triggered when the about-button in the UI has been clicked
void on_qpbAbout_clicked();
/// Slot triggered when the reload-button in the UI has been clicked
void on_qpbReload_clicked();
/// Slot triggered when the unload-button in the UI has been clicked
void on_qpbUnload_clicked();
/// Slot triggered when the selection in the plugin list hast changed
///
/// @param current The currently selected item
/// @param old The previously selected item (if applicable - otherwise NULL/nullptr)
void on_qtwPlugins_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *old);
};
#endif
|