summaryrefslogtreecommitdiff
path: root/src/activatemodsdialog.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-06-15 14:42:20 +0200
committerTannin <devnull@localhost>2013-06-15 14:42:20 +0200
commit49cbe0349184419530d22782cc670946b61c9f01 (patch)
treea73c952c93f0624771df97fa9b2b724b51ed0956 /src/activatemodsdialog.cpp
parent6069decb159ec30b7a69649294ee0e89783bb717 (diff)
- completed Qt5 compatibility
- added GetFileVerisonInfoW hook for Windows 8 compatibility - fixed BossDummy to compile correctly with current version of the RGiesecke.DllExport assembly - fixed NCC components compiling with different Framewerk versions - dropped files-list in Nexus-tab of modinfo dialog
Diffstat (limited to 'src/activatemodsdialog.cpp')
-rw-r--r--src/activatemodsdialog.cpp166
1 files changed, 83 insertions, 83 deletions
diff --git a/src/activatemodsdialog.cpp b/src/activatemodsdialog.cpp
index fe085c49..cf798189 100644
--- a/src/activatemodsdialog.cpp
+++ b/src/activatemodsdialog.cpp
@@ -17,86 +17,86 @@ You should have received a copy of the GNU General Public License
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "activatemodsdialog.h"
-#include "ui_activatemodsdialog.h"
-
-#include <QComboBox>
-#include <QLabel>
-
-ActivateModsDialog::ActivateModsDialog(const std::map<QString, std::vector<QString> > &missingPlugins, QWidget *parent)
- : TutorableDialog("ActivateMods", parent), ui(new Ui::ActivateModsDialog)
-{
- ui->setupUi(this);
-
- QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
- QHeaderView *headerView = modsTable->horizontalHeader();
-#if QT_VERSION >= 0x050000
- headerView->setSectionResizeMode(0, QHeaderView::Stretch);
- headerView->setSectionResizeMode(1, QHeaderView::Interactive);
-#else
- headerView->setResizeMode(0, QHeaderView::Stretch);
- headerView->setResizeMode(1, QHeaderView::Interactive);
-#endif
-
- int row = 0;
-
- modsTable->setRowCount(missingPlugins.size());
-
- for (std::map<QString, std::vector<QString> >::const_iterator espIter = missingPlugins.begin();
- espIter != missingPlugins.end(); ++espIter, ++row) {
- modsTable->setCellWidget(row, 0, new QLabel(espIter->first));
- if (espIter->second.size() == 0) {
- modsTable->setCellWidget(row, 1, new QLabel(tr("not found")));
- } else {
- QComboBox* combo = new QComboBox();
- for (std::vector<QString>::const_iterator modIter = espIter->second.begin();
- modIter != espIter->second.end(); ++modIter) {
- combo->addItem(*modIter);
- }
- modsTable->setCellWidget(row, 1, combo);
- }
- }
-}
-
-
-ActivateModsDialog::~ActivateModsDialog()
-{
- delete ui;
-}
-
-
-void ActivateModsDialog::on_buttonBox_accepted()
-{
-}
-
-
-std::set<QString> ActivateModsDialog::getModsToActivate()
-{
- std::set<QString> result;
- QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
-
- for (int row = 0; row < modsTable->rowCount(); ++row) {
- QComboBox *comboBox = dynamic_cast<QComboBox*>(modsTable->cellWidget(row, 1));
- if (comboBox != NULL) {
- result.insert(comboBox->currentText());
- }
- }
- return result;
-}
-
-
-std::set<QString> ActivateModsDialog::getESPsToActivate()
-{
- std::set<QString> result;
- QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
-
- for (int row = 0; row < modsTable->rowCount(); ++row) {
- QComboBox *comboBox = dynamic_cast<QComboBox*>(modsTable->cellWidget(row, 1));
- if (comboBox != NULL) {
- QLabel *espName = dynamic_cast<QLabel*>(modsTable->cellWidget(row, 0));
-
- result.insert(espName->text());
- }
- }
- return result;
-}
+#include "activatemodsdialog.h"
+#include "ui_activatemodsdialog.h"
+
+#include <QComboBox>
+#include <QLabel>
+
+ActivateModsDialog::ActivateModsDialog(const std::map<QString, std::vector<QString> > &missingPlugins, QWidget *parent)
+ : TutorableDialog("ActivateMods", parent), ui(new Ui::ActivateModsDialog)
+{
+ ui->setupUi(this);
+
+ QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
+ QHeaderView *headerView = modsTable->horizontalHeader();
+#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
+ headerView->setSectionResizeMode(0, QHeaderView::Stretch);
+ headerView->setSectionResizeMode(1, QHeaderView::Interactive);
+#else
+ headerView->setResizeMode(0, QHeaderView::Stretch);
+ headerView->setResizeMode(1, QHeaderView::Interactive);
+#endif
+
+ int row = 0;
+
+ modsTable->setRowCount(missingPlugins.size());
+
+ for (std::map<QString, std::vector<QString> >::const_iterator espIter = missingPlugins.begin();
+ espIter != missingPlugins.end(); ++espIter, ++row) {
+ modsTable->setCellWidget(row, 0, new QLabel(espIter->first));
+ if (espIter->second.size() == 0) {
+ modsTable->setCellWidget(row, 1, new QLabel(tr("not found")));
+ } else {
+ QComboBox* combo = new QComboBox();
+ for (std::vector<QString>::const_iterator modIter = espIter->second.begin();
+ modIter != espIter->second.end(); ++modIter) {
+ combo->addItem(*modIter);
+ }
+ modsTable->setCellWidget(row, 1, combo);
+ }
+ }
+}
+
+
+ActivateModsDialog::~ActivateModsDialog()
+{
+ delete ui;
+}
+
+
+void ActivateModsDialog::on_buttonBox_accepted()
+{
+}
+
+
+std::set<QString> ActivateModsDialog::getModsToActivate()
+{
+ std::set<QString> result;
+ QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
+
+ for (int row = 0; row < modsTable->rowCount(); ++row) {
+ QComboBox *comboBox = dynamic_cast<QComboBox*>(modsTable->cellWidget(row, 1));
+ if (comboBox != NULL) {
+ result.insert(comboBox->currentText());
+ }
+ }
+ return result;
+}
+
+
+std::set<QString> ActivateModsDialog::getESPsToActivate()
+{
+ std::set<QString> result;
+ QTableWidget *modsTable = findChild<QTableWidget*>("modsTable");
+
+ for (int row = 0; row < modsTable->rowCount(); ++row) {
+ QComboBox *comboBox = dynamic_cast<QComboBox*>(modsTable->cellWidget(row, 1));
+ if (comboBox != NULL) {
+ QLabel *espName = dynamic_cast<QLabel*>(modsTable->cellWidget(row, 0));
+
+ result.insert(espName->text());
+ }
+ }
+ return result;
+}