2010-03-24 00:11:46 +01:00
|
|
|
/* This file is part of Clementine.
|
2010-11-20 14:27:10 +01:00
|
|
|
Copyright 2010, David Sansome <me@davidsansome.com>
|
2010-03-24 00:11:46 +01:00
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2017-01-11 19:08:43 +01:00
|
|
|
#include "settingsdialog.h"
|
2012-01-09 20:08:09 +01:00
|
|
|
#include "appearancesettingspage.h"
|
2011-08-14 01:07:10 +02:00
|
|
|
#include "backgroundstreamssettingspage.h"
|
|
|
|
#include "behavioursettingspage.h"
|
2010-05-10 23:50:31 +02:00
|
|
|
#include "config.h"
|
2012-03-09 16:25:49 +01:00
|
|
|
#include "core/application.h"
|
2011-08-14 01:07:10 +02:00
|
|
|
#include "core/backgroundstreams.h"
|
2011-08-14 16:41:47 +02:00
|
|
|
#include "core/logging.h"
|
2011-08-14 01:07:10 +02:00
|
|
|
#include "core/networkproxyfactory.h"
|
2012-03-09 16:25:49 +01:00
|
|
|
#include "core/player.h"
|
2010-04-04 19:50:11 +02:00
|
|
|
#include "engines/enginebase.h"
|
2010-12-26 14:01:35 +01:00
|
|
|
#include "engines/gstengine.h"
|
2011-10-30 19:52:38 +01:00
|
|
|
#include "globalsearch/globalsearchsettingspage.h"
|
2017-01-11 19:08:43 +01:00
|
|
|
#include "globalshortcutssettingspage.h"
|
|
|
|
#include "iconloader.h"
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/core/internetshowsettingspage.h"
|
2017-01-11 19:08:43 +01:00
|
|
|
#include "internet/digitally/digitallyimportedsettingspage.h"
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/magnatune/magnatunesettingspage.h"
|
2017-01-11 19:08:43 +01:00
|
|
|
#include "internet/podcasts/podcastsettingspage.h"
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/soundcloud/soundcloudsettingspage.h"
|
|
|
|
#include "internet/spotify/spotifysettingspage.h"
|
|
|
|
#include "internet/subsonic/subsonicsettingspage.h"
|
2011-08-14 01:07:10 +02:00
|
|
|
#include "library/librarysettingspage.h"
|
2017-01-11 19:08:43 +01:00
|
|
|
#include "mainwindow.h"
|
|
|
|
#include "networkproxysettingspage.h"
|
|
|
|
#include "networkremotesettingspage.h"
|
|
|
|
#include "notificationssettingspage.h"
|
|
|
|
#include "playbacksettingspage.h"
|
2010-08-27 12:36:01 +02:00
|
|
|
#include "playlist/playlistview.h"
|
2011-08-14 01:07:10 +02:00
|
|
|
#include "songinfo/songinfosettingspage.h"
|
|
|
|
#include "transcoder/transcodersettingspage.h"
|
2011-10-30 17:51:43 +01:00
|
|
|
#include "widgets/groupediconview.h"
|
2010-05-10 23:50:31 +02:00
|
|
|
#include "widgets/osdpretty.h"
|
|
|
|
|
2010-12-03 14:53:43 +01:00
|
|
|
#include "ui_settingsdialog.h"
|
|
|
|
|
2010-12-18 18:28:02 +01:00
|
|
|
#ifdef HAVE_LIBLASTFM
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/lastfm/lastfmsettingspage.h"
|
2010-12-18 18:28:02 +01:00
|
|
|
#endif
|
|
|
|
|
2011-03-12 22:19:32 +01:00
|
|
|
#ifdef HAVE_WIIMOTEDEV
|
2014-02-07 16:34:20 +01:00
|
|
|
#include "wiimotedev/wiimotesettingspage.h"
|
2010-08-24 21:57:43 +02:00
|
|
|
#endif
|
|
|
|
|
2012-07-29 16:06:23 +02:00
|
|
|
#ifdef HAVE_GOOGLE_DRIVE
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/googledrive/googledrivesettingspage.h"
|
2012-07-29 16:06:23 +02:00
|
|
|
#endif
|
|
|
|
|
2012-11-29 18:19:41 +01:00
|
|
|
#ifdef HAVE_DROPBOX
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/dropbox/dropboxsettingspage.h"
|
2012-11-29 18:19:41 +01:00
|
|
|
#endif
|
|
|
|
|
2013-02-12 13:54:19 +01:00
|
|
|
#ifdef HAVE_BOX
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/box/boxsettingspage.h"
|
2013-02-12 13:54:19 +01:00
|
|
|
#endif
|
|
|
|
|
2014-03-30 07:35:27 +02:00
|
|
|
#ifdef HAVE_SKYDRIVE
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/skydrive/skydrivesettingspage.h"
|
2014-03-07 18:58:50 +01:00
|
|
|
#endif
|
|
|
|
|
2014-06-03 14:33:07 +02:00
|
|
|
#ifdef HAVE_SEAFILE
|
2014-12-18 23:35:21 +01:00
|
|
|
#include "internet/seafile/seafilesettingspage.h"
|
2014-06-03 14:33:07 +02:00
|
|
|
#endif
|
|
|
|
|
2013-03-25 02:44:35 +01:00
|
|
|
#include <QAbstractButton>
|
2011-08-14 16:41:47 +02:00
|
|
|
#include <QDesktopWidget>
|
2011-10-30 17:51:43 +01:00
|
|
|
#include <QPainter>
|
2011-08-14 01:07:10 +02:00
|
|
|
#include <QPushButton>
|
2011-08-14 16:41:47 +02:00
|
|
|
#include <QScrollArea>
|
2010-12-03 14:53:43 +01:00
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
SettingsItemDelegate::SettingsItemDelegate(QObject* parent)
|
2014-02-07 16:34:20 +01:00
|
|
|
: QStyledItemDelegate(parent) {}
|
2011-10-30 17:51:43 +01:00
|
|
|
|
|
|
|
QSize SettingsItemDelegate::sizeHint(const QStyleOptionViewItem& option,
|
|
|
|
const QModelIndex& index) const {
|
2014-02-07 16:34:20 +01:00
|
|
|
const bool is_separator =
|
|
|
|
index.data(SettingsDialog::Role_IsSeparator).toBool();
|
2011-10-30 17:51:43 +01:00
|
|
|
QSize ret = QStyledItemDelegate::sizeHint(option, index);
|
|
|
|
|
|
|
|
if (is_separator) {
|
|
|
|
ret.setHeight(ret.height() * 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
void SettingsItemDelegate::paint(QPainter* painter,
|
|
|
|
const QStyleOptionViewItem& option,
|
2011-10-30 17:51:43 +01:00
|
|
|
const QModelIndex& index) const {
|
2014-02-07 16:34:20 +01:00
|
|
|
const bool is_separator =
|
|
|
|
index.data(SettingsDialog::Role_IsSeparator).toBool();
|
2011-10-30 17:51:43 +01:00
|
|
|
|
|
|
|
if (is_separator) {
|
|
|
|
GroupedIconView::DrawHeader(painter, option.rect, option.font,
|
|
|
|
option.palette, index.data().toString());
|
|
|
|
} else {
|
|
|
|
QStyledItemDelegate::paint(painter, option, index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
SettingsDialog::SettingsDialog(Application* app, BackgroundStreams* streams,
|
|
|
|
QWidget* parent)
|
|
|
|
: QDialog(parent),
|
|
|
|
app_(app),
|
|
|
|
model_(app_->library_model()->directory_model()),
|
|
|
|
gst_engine_(qobject_cast<GstEngine*>(app_->player()->engine())),
|
|
|
|
song_info_view_(nullptr),
|
|
|
|
streams_(streams),
|
|
|
|
global_search_(app_->global_search()),
|
|
|
|
appearance_(app_->appearance()),
|
|
|
|
ui_(new Ui_SettingsDialog),
|
|
|
|
loading_settings_(false) {
|
2010-06-09 00:56:31 +02:00
|
|
|
ui_->setupUi(this);
|
2011-10-30 17:51:43 +01:00
|
|
|
ui_->list->setItemDelegate(new SettingsItemDelegate(this));
|
2010-12-18 18:28:02 +01:00
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
QTreeWidgetItem* general = AddCategory(tr("General"));
|
2010-12-18 18:28:02 +01:00
|
|
|
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Playback, new PlaybackSettingsPage(this), general);
|
|
|
|
AddPage(Page_Behaviour, new BehaviourSettingsPage(this), general);
|
|
|
|
AddPage(Page_Library, new LibrarySettingsPage(this), general);
|
|
|
|
AddPage(Page_Proxy, new NetworkProxySettingsPage(this), general);
|
|
|
|
AddPage(Page_Transcoding, new TranscoderSettingsPage(this), general);
|
2012-12-31 23:37:39 +01:00
|
|
|
AddPage(Page_NetworkRemote, new NetworkRemoteSettingsPage(this), general);
|
2011-02-17 14:47:54 +01:00
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
#ifdef HAVE_WIIMOTEDEV
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Wiimotedev, new WiimoteSettingsPage(this), general);
|
2011-04-25 21:16:26 +02:00
|
|
|
#endif
|
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
// User interface
|
2011-11-27 20:42:31 +01:00
|
|
|
QTreeWidgetItem* iface = AddCategory(tr("User interface"));
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_GlobalShortcuts, new GlobalShortcutsSettingsPage(this), iface);
|
|
|
|
AddPage(Page_GlobalSearch, new GlobalSearchSettingsPage(this), iface);
|
|
|
|
AddPage(Page_Appearance, new AppearanceSettingsPage(this), iface);
|
|
|
|
AddPage(Page_SongInformation, new SongInfoSettingsPage(this), iface);
|
|
|
|
AddPage(Page_Notifications, new NotificationsSettingsPage(this), iface);
|
2014-10-15 20:44:09 +02:00
|
|
|
AddPage(Page_InternetShow, new InternetShowSettingsPage(this), iface);
|
2011-02-17 14:47:54 +01:00
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
// Internet providers
|
|
|
|
QTreeWidgetItem* providers = AddCategory(tr("Internet providers"));
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBLASTFM
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Lastfm, new LastFMSettingsPage(this), providers);
|
2010-12-18 18:28:02 +01:00
|
|
|
#endif
|
|
|
|
|
2012-07-29 16:06:23 +02:00
|
|
|
#ifdef HAVE_GOOGLE_DRIVE
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_GoogleDrive, new GoogleDriveSettingsPage(this), providers);
|
2012-07-29 16:06:23 +02:00
|
|
|
#endif
|
|
|
|
|
2012-11-29 18:19:41 +01:00
|
|
|
#ifdef HAVE_DROPBOX
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Dropbox, new DropboxSettingsPage(this), providers);
|
2012-11-29 18:19:41 +01:00
|
|
|
#endif
|
|
|
|
|
2013-02-12 13:54:19 +01:00
|
|
|
#ifdef HAVE_BOX
|
|
|
|
AddPage(Page_Box, new BoxSettingsPage(this), providers);
|
|
|
|
#endif
|
|
|
|
|
2014-03-30 07:35:27 +02:00
|
|
|
#ifdef HAVE_SKYDRIVE
|
|
|
|
AddPage(Page_Skydrive, new SkydriveSettingsPage(this), providers);
|
|
|
|
#endif
|
|
|
|
|
2014-03-26 21:33:27 +01:00
|
|
|
AddPage(Page_SoundCloud, new SoundCloudSettingsPage(this), providers);
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Spotify, new SpotifySettingsPage(this), providers);
|
2014-03-07 18:58:50 +01:00
|
|
|
|
2014-06-03 14:33:07 +02:00
|
|
|
#ifdef HAVE_SEAFILE
|
|
|
|
AddPage(Page_Seafile, new SeafileSettingsPage(this), providers);
|
|
|
|
#endif
|
|
|
|
|
2015-03-27 14:56:08 +01:00
|
|
|
#ifdef HAVE_AMAZON_CLOUD_DRIVE
|
|
|
|
AddPage(Page_AmazonCloudDrive, new AmazonSettingsPage(this), providers);
|
|
|
|
#endif
|
|
|
|
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Magnatune, new MagnatuneSettingsPage(this), providers);
|
2014-02-07 16:34:20 +01:00
|
|
|
AddPage(Page_DigitallyImported, new DigitallyImportedSettingsPage(this),
|
|
|
|
providers);
|
|
|
|
AddPage(Page_BackgroundStreams, new BackgroundStreamsSettingsPage(this),
|
|
|
|
providers);
|
2011-12-06 00:10:25 +01:00
|
|
|
AddPage(Page_Subsonic, new SubsonicSettingsPage(this), providers);
|
2012-12-05 10:36:22 +01:00
|
|
|
AddPage(Page_Podcasts, new PodcastSettingsPage(this), providers);
|
2011-10-30 17:51:43 +01:00
|
|
|
|
2014-03-30 07:48:38 +02:00
|
|
|
providers->sortChildren(0, Qt::AscendingOrder);
|
|
|
|
|
2010-02-03 18:21:25 +01:00
|
|
|
// List box
|
2014-02-07 16:34:20 +01:00
|
|
|
connect(ui_->list,
|
|
|
|
SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
|
2011-10-30 17:51:43 +01:00
|
|
|
SLOT(CurrentItemChanged(QTreeWidgetItem*)));
|
2012-12-05 10:36:22 +01:00
|
|
|
ui_->list->setCurrentItem(pages_[Page_Playback].item_);
|
2010-02-03 18:21:25 +01:00
|
|
|
|
2010-05-17 02:47:43 +02:00
|
|
|
// Make sure the list is big enough to show all the items
|
2014-02-07 16:34:20 +01:00
|
|
|
ui_->list->setMinimumWidth(
|
|
|
|
static_cast<QAbstractItemView*>(ui_->list)->sizeHintForColumn(0));
|
2010-06-18 16:21:46 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
ui_->buttonBox->button(QDialogButtonBox::Cancel)
|
|
|
|
->setShortcut(QKeySequence::Close);
|
2010-03-25 20:30:10 +01:00
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
SettingsDialog::~SettingsDialog() { delete ui_; }
|
2010-02-03 17:17:04 +01:00
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
QTreeWidgetItem* SettingsDialog::AddCategory(const QString& name) {
|
|
|
|
QTreeWidgetItem* item = new QTreeWidgetItem;
|
|
|
|
item->setText(0, name);
|
|
|
|
item->setData(0, Role_IsSeparator, true);
|
|
|
|
item->setFlags(Qt::ItemIsEnabled);
|
|
|
|
|
|
|
|
ui_->list->invisibleRootItem()->addChild(item);
|
|
|
|
item->setExpanded(true);
|
|
|
|
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
void SettingsDialog::AddPage(Page id, SettingsPage* page,
|
|
|
|
QTreeWidgetItem* parent) {
|
|
|
|
if (!parent) parent = ui_->list->invisibleRootItem();
|
2011-10-30 17:51:43 +01:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
// Connect page's signals to the settings dialog's signals
|
2014-02-07 16:34:20 +01:00
|
|
|
connect(page, SIGNAL(NotificationPreview(OSD::Behaviour, QString, QString)),
|
|
|
|
SIGNAL(NotificationPreview(OSD::Behaviour, QString, QString)));
|
2011-08-14 01:07:10 +02:00
|
|
|
connect(page, SIGNAL(SetWiimotedevInterfaceActived(bool)),
|
2014-02-07 16:34:20 +01:00
|
|
|
SIGNAL(SetWiimotedevInterfaceActived(bool)));
|
2010-02-03 17:17:04 +01:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
// Create the list item
|
2011-10-30 17:51:43 +01:00
|
|
|
QTreeWidgetItem* item = new QTreeWidgetItem;
|
|
|
|
item->setText(0, page->windowTitle());
|
|
|
|
item->setIcon(0, page->windowIcon());
|
|
|
|
item->setData(0, Role_IsSeparator, false);
|
2011-08-14 01:07:10 +02:00
|
|
|
|
|
|
|
if (!page->IsEnabled()) {
|
|
|
|
item->setFlags(Qt::NoItemFlags);
|
|
|
|
}
|
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
parent->addChild(item);
|
|
|
|
|
2011-08-14 16:41:47 +02:00
|
|
|
// Create a scroll area containing the page
|
|
|
|
QScrollArea* area = new QScrollArea;
|
|
|
|
area->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
|
|
|
area->setWidget(page);
|
|
|
|
area->setWidgetResizable(true);
|
|
|
|
area->setFrameShape(QFrame::NoFrame);
|
2011-08-14 21:19:54 +02:00
|
|
|
area->setMinimumWidth(page->layout()->minimumSize().width());
|
2011-08-14 16:41:47 +02:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
// Add the page to the stack
|
2011-08-14 16:41:47 +02:00
|
|
|
ui_->stacked_widget->addWidget(area);
|
2010-02-03 17:51:56 +01:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
// Remember where the page is
|
|
|
|
PageData data;
|
2011-10-30 17:51:43 +01:00
|
|
|
data.item_ = item;
|
2011-08-14 16:41:47 +02:00
|
|
|
data.scroll_area_ = area;
|
2011-08-14 01:07:10 +02:00
|
|
|
data.page_ = page;
|
|
|
|
pages_[id] = data;
|
2010-06-23 18:27:23 +02:00
|
|
|
}
|
|
|
|
|
2013-03-25 02:44:35 +01:00
|
|
|
void SettingsDialog::Save() {
|
2014-02-10 14:29:07 +01:00
|
|
|
for (const PageData& data : pages_.values()) {
|
|
|
|
data.page_->Save();
|
|
|
|
}
|
2013-03-25 02:44:35 +01:00
|
|
|
}
|
2011-06-27 20:15:55 +02:00
|
|
|
|
2013-03-25 02:44:35 +01:00
|
|
|
void SettingsDialog::accept() {
|
|
|
|
Save();
|
2010-02-03 17:51:56 +01:00
|
|
|
QDialog::accept();
|
|
|
|
}
|
|
|
|
|
2012-01-09 21:15:42 +01:00
|
|
|
void SettingsDialog::reject() {
|
|
|
|
// Notify each page that user clicks on Cancel
|
2014-02-10 14:29:07 +01:00
|
|
|
for (const PageData& data : pages_.values()) {
|
|
|
|
data.page_->Cancel();
|
|
|
|
}
|
2012-01-09 21:15:42 +01:00
|
|
|
|
|
|
|
QDialog::reject();
|
|
|
|
}
|
|
|
|
|
2013-03-25 02:44:35 +01:00
|
|
|
void SettingsDialog::DialogButtonClicked(QAbstractButton* button) {
|
|
|
|
// While we only connect Apply at the moment, this might change in the future
|
|
|
|
if (ui_->buttonBox->button(QDialogButtonBox::Apply) == button) {
|
|
|
|
Save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
void SettingsDialog::showEvent(QShowEvent* e) {
|
2011-08-14 16:41:47 +02:00
|
|
|
// Load settings
|
2010-03-25 20:30:10 +01:00
|
|
|
loading_settings_ = true;
|
2014-02-10 14:29:07 +01:00
|
|
|
for (const PageData& data : pages_.values()) {
|
|
|
|
data.page_->Load();
|
|
|
|
}
|
2010-03-25 20:30:10 +01:00
|
|
|
loading_settings_ = false;
|
|
|
|
|
2011-08-14 16:41:47 +02:00
|
|
|
// Resize the dialog if it's too big
|
2014-02-07 16:34:20 +01:00
|
|
|
const QSize available =
|
|
|
|
QApplication::desktop()->availableGeometry(this).size();
|
2011-08-14 16:41:47 +02:00
|
|
|
if (available.height() < height()) {
|
|
|
|
resize(width(), sizeHint().height());
|
|
|
|
}
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
QDialog::showEvent(e);
|
2010-02-03 18:21:25 +01:00
|
|
|
}
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
void SettingsDialog::OpenAtPage(Page page) {
|
|
|
|
if (!pages_.contains(page)) {
|
2010-03-25 20:30:10 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
ui_->list->setCurrentItem(pages_[page].item_);
|
2010-06-09 00:56:31 +02:00
|
|
|
show();
|
2010-04-12 01:03:39 +02:00
|
|
|
}
|
2010-10-10 18:46:35 +02:00
|
|
|
|
2011-10-30 17:51:43 +01:00
|
|
|
void SettingsDialog::CurrentItemChanged(QTreeWidgetItem* item) {
|
2014-02-07 16:34:20 +01:00
|
|
|
if (!(item->flags() & Qt::ItemIsSelectable)) {
|
2011-10-30 17:51:43 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set the title
|
|
|
|
ui_->title->setText("<b>" + item->text(0) + "</b>");
|
|
|
|
|
|
|
|
// Display the right page
|
2014-02-10 14:29:07 +01:00
|
|
|
for (const PageData& data : pages_.values()) {
|
2011-10-30 17:51:43 +01:00
|
|
|
if (data.item_ == item) {
|
|
|
|
ui_->stacked_widget->setCurrentWidget(data.scroll_area_);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2011-05-22 23:15:11 +02:00
|
|
|
}
|