19
19
#define SETTINGSDIALOG_H
22
#include <QStyledItemDelegate>
25
24
#include "config.h"
25
#include "widgets/osd.h"
28
class QTreeWidgetItem;
31
30
class BackgroundStreams;
32
32
class GlobalShortcuts;
33
33
class LibraryDirectoryModel;
35
35
class SongInfoView;
36
36
class Ui_SettingsDialog;
41
#ifdef HAVE_WIIMOTEDEV
42
class WiimotedevShortcutsConfig;
41
class SettingsItemDelegate : public QStyledItemDelegate {
43
SettingsItemDelegate(QObject* parent);
45
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
46
void paint(QPainter* painter, const QStyleOptionViewItem& option,
47
const QModelIndex& index) const;
50
51
class SettingsDialog : public QDialog {
54
55
SettingsDialog(BackgroundStreams* streams, QWidget* parent = 0);
60
61
Page_SongInformation,
61
62
Page_GlobalShortcuts,
62
64
Page_Notifications,
70
Page_DigitallyImported,
68
71
Page_BackgroundStreams,
73
#ifdef HAVE_WIIMOTEDEV
78
void SetLibraryDirectoryModel(LibraryDirectoryModel* model);
79
void SetGlobalShortcutManager(GlobalShortcuts* manager);
79
Role_IsSeparator = Qt::UserRole
82
void SetLibraryDirectoryModel(LibraryDirectoryModel* model) { model_ = model; }
83
void SetGlobalShortcutManager(GlobalShortcuts* manager) { manager_ = manager; }
80
84
void SetGstEngine(const GstEngine* engine) { gst_engine_ = engine; }
81
void SetSongInfoView(SongInfoView* view);
85
void SetSongInfoView(SongInfoView* view) { song_info_view_ = view; }
86
void SetGlobalSearch(GlobalSearch* global_search) { global_search_ = global_search; }
88
bool is_loading_settings() const { return loading_settings_; }
90
LibraryDirectoryModel* library_directory_model() const { return model_; }
91
GlobalShortcuts* global_shortcuts_manager() const { return manager_; }
92
const GstEngine* gst_engine() const { return gst_engine_; }
93
SongInfoView* song_info_view() const { return song_info_view_; }
94
BackgroundStreams* background_streams() const { return streams_; }
95
GlobalSearch* global_search() const { return global_search_; }
83
97
void OpenAtPage(Page page);
89
103
void showEvent(QShowEvent* e);
90
void hideEvent(QHideEvent *);
93
void AddStream(const QString& name);
98
void CurrentTextChanged(const QString& text);
99
void NotificationTypeChanged();
100
void ValidationComplete(bool success);
102
void PrettyOpacityChanged(int value);
103
void PrettyColorPresetChanged(int index);
104
void ChooseBgColor();
105
void ChooseFgColor();
107
void UpdatePopupVisible();
108
void ShowTrayIconToggled(bool on);
109
void GstPluginChanged(int index);
110
void FadingOptionsChanged();
111
void RgPreampChanged(int value);
113
void SongInfoFontSizeChanged(double value);
115
// Background streams.
116
void EnableStream(bool enabled);
117
void StreamVolumeChanged(int value);
120
#ifdef HAVE_LIBLASTFM
121
LastFMConfig* lastfm_config_;
123
#ifdef HAVE_WIIMOTEDEV
124
WiimotedevShortcutsConfig* wiimotedev_config_;
127
RemoteConfig* remote_config_;
106
void NotificationPreview(OSD::Behaviour, QString, QString);
107
void SetWiimotedevInterfaceActived(bool);
110
void CurrentItemChanged(QTreeWidgetItem* item);
114
QTreeWidgetItem* item_;
115
QScrollArea* scroll_area_;
119
QTreeWidgetItem* AddCategory(const QString& name);
120
void AddPage(Page id, SettingsPage* page, QTreeWidgetItem* parent = NULL);
123
LibraryDirectoryModel* model_;
124
GlobalShortcuts* manager_;
129
125
const GstEngine* gst_engine_;
126
SongInfoView* song_info_view_;
127
BackgroundStreams* streams_;
128
GlobalSearch* global_search_;
131
130
Ui_SettingsDialog* ui_;
132
131
bool loading_settings_;
134
OSDPretty* pretty_popup_;
136
QMap<QString, QString> language_map_;
138
BackgroundStreams* streams_;
140
#ifdef HAVE_WIIMOTEDEV
142
void SetWiimotedevInterfaceActived(bool);
133
QMap<Page, PageData> pages_;
146
136
#endif // SETTINGSDIALOG_H