From 346087efbb1eadf462b8b448a0d4c0458d3a2c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 6 Oct 2013 14:43:46 +0200 Subject: Misc version dialog changes --- gui/versionselectdialog.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'gui/versionselectdialog.cpp') diff --git a/gui/versionselectdialog.cpp b/gui/versionselectdialog.cpp index ff990188..d975a7b4 100644 --- a/gui/versionselectdialog.cpp +++ b/gui/versionselectdialog.cpp @@ -3,7 +3,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -26,18 +26,18 @@ #include #include -VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QWidget *parent) : - QDialog(parent), - ui(new Ui::VersionSelectDialog) +VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, QWidget *parent) + : QDialog(parent), ui(new Ui::VersionSelectDialog) { ui->setupUi(this); setWindowModality(Qt::WindowModal); - + setWindowTitle(title); + m_vlist = vlist; - + m_proxyModel = new QSortFilterProxyModel(this); m_proxyModel->setSourceModel(vlist); - + ui->listView->setModel(m_proxyModel); ui->listView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->listView->header()->setSectionResizeMode(0, QHeaderView::Stretch); @@ -86,11 +86,11 @@ void VersionSelectDialog::setFilter(int column, QString filter) filteredTypes += "Snapshot"; if (!ui->filterMCNostalgiaCheckbox->isChecked()) filteredTypes += "Nostalgia"; - + QString regexStr = "^.*$"; if (filteredTypes.length() > 0) regexStr = QString("^((?!%1).)*$").arg(filteredTypes.join('|')); - + QLOG_DEBUG() << "Filter:" << regexStr; */ } -- cgit v1.2.3