2017-09-09 21:40:00 +02:00
|
|
|
#ifndef SETTINGSDIALOG_H
|
|
|
|
#define SETTINGSDIALOG_H
|
|
|
|
|
2021-01-25 19:48:11 +01:00
|
|
|
#include <syncthingmodel/syncthingstatusselectionmodel.h>
|
2018-10-10 17:48:48 +02:00
|
|
|
|
2021-01-25 19:48:11 +01:00
|
|
|
#include <syncthingwidgets/settings/settingsdialog.h>
|
2018-10-10 17:48:48 +02:00
|
|
|
|
2017-09-09 21:40:00 +02:00
|
|
|
#include <qtutilities/settingsdialog/optionpage.h>
|
|
|
|
|
|
|
|
QT_FORWARD_DECLARE_CLASS(QKeySequenceEdit)
|
|
|
|
|
|
|
|
namespace QtGui {
|
|
|
|
class SettingsDialog;
|
|
|
|
}
|
|
|
|
|
2018-10-10 17:48:48 +02:00
|
|
|
namespace Data {
|
|
|
|
class SyncthingStatusSelectionModel;
|
|
|
|
}
|
|
|
|
|
2017-09-09 21:40:00 +02:00
|
|
|
namespace Plasmoid {
|
|
|
|
class SyncthingApplet;
|
|
|
|
|
|
|
|
BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR(ShortcutOptionPage)
|
|
|
|
public:
|
|
|
|
ShortcutOptionPage(SyncthingApplet &applet, QWidget *parentWidget = nullptr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_SETUP_WIDGETS
|
|
|
|
SyncthingApplet *m_applet;
|
|
|
|
QKeySequenceEdit *m_globalShortcutEdit;
|
|
|
|
END_DECLARE_OPTION_PAGE
|
|
|
|
|
2017-09-18 20:29:36 +02:00
|
|
|
BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(AppearanceOptionPage)
|
|
|
|
public:
|
|
|
|
AppearanceOptionPage(SyncthingApplet &applet, QWidget *parentWidget = nullptr);
|
2018-10-10 17:48:48 +02:00
|
|
|
Data::SyncthingStatusSelectionModel *passiveStatusSelection();
|
2017-09-18 20:29:36 +02:00
|
|
|
|
|
|
|
private:
|
2017-10-03 16:58:50 +02:00
|
|
|
DECLARE_SETUP_WIDGETS
|
2017-09-18 20:29:36 +02:00
|
|
|
SyncthingApplet *m_applet;
|
2018-10-10 17:48:48 +02:00
|
|
|
Data::SyncthingStatusSelectionModel m_passiveStatusSelection;
|
2017-09-18 20:29:36 +02:00
|
|
|
END_DECLARE_OPTION_PAGE
|
|
|
|
|
2018-10-10 17:48:48 +02:00
|
|
|
inline Data::SyncthingStatusSelectionModel *AppearanceOptionPage::passiveStatusSelection()
|
|
|
|
{
|
|
|
|
return &m_passiveStatusSelection;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SettingsDialog : public QtGui::SettingsDialog {
|
|
|
|
public:
|
|
|
|
SettingsDialog(Plasmoid::SyncthingApplet &applet);
|
|
|
|
|
|
|
|
AppearanceOptionPage *appearanceOptionPage();
|
|
|
|
|
|
|
|
private:
|
|
|
|
AppearanceOptionPage *m_appearanceOptionPage;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline AppearanceOptionPage *SettingsDialog::appearanceOptionPage()
|
|
|
|
{
|
|
|
|
return m_appearanceOptionPage;
|
|
|
|
}
|
|
|
|
|
2017-09-09 21:40:00 +02:00
|
|
|
QtGui::SettingsDialog *setupSettingsDialog(Plasmoid::SyncthingApplet &applet);
|
2017-09-17 21:48:15 +02:00
|
|
|
} // namespace Plasmoid
|
2017-09-09 21:40:00 +02:00
|
|
|
|
|
|
|
#endif // SETTINGSDIALOG_H
|