From be47750a45ed2101b010d76a583892aa2054aac4 Mon Sep 17 00:00:00 2001 From: Pieter van der Kloet Date: Sun, 24 Apr 2011 23:29:32 +0200 Subject: [PATCH] Added combobox slot for changing the profile --- apps/launcher/datafilespage.cpp | 13 ++++++++++++- apps/launcher/datafilespage.hpp | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index b186a3efc..5cbe2e2b3 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -90,10 +90,15 @@ DataFilesPage::DataFilesPage(QWidget *parent) : QWidget(parent) setupDataFiles(); - connect(mMastersWidget->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SLOT(masterSelectionChanged(const QItemSelection&, const QItemSelection&))); + connect(mMastersWidget->selectionModel(), + SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), + this, SLOT(masterSelectionChanged(const QItemSelection&, const QItemSelection&))); + connect(mPluginsTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckstate(QModelIndex))); connect(mPluginsModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(resizeRows())); + connect(mProfileComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(profileChanged(const QString&))); + } void DataFilesPage::setupDataFiles() @@ -347,6 +352,12 @@ void DataFilesPage::resizeRows() mPluginsTable->resizeRowsToContents(); } +void DataFilesPage::profileChanged(const QString &profile) +{ + qDebug() << "Profile changed"; + uncheckPlugins(); + +} void DataFilesPage::writeConfig() { diff --git a/apps/launcher/datafilespage.hpp b/apps/launcher/datafilespage.hpp index 15ec06211..03c6f84dd 100644 --- a/apps/launcher/datafilespage.hpp +++ b/apps/launcher/datafilespage.hpp @@ -29,6 +29,7 @@ public slots: void masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); void setCheckstate(QModelIndex index); void resizeRows(); + void profileChanged(const QString &profile); private: QTableWidget *mMastersWidget;