diff options
Diffstat (limited to 'tools/qtconfig')
-rw-r--r-- | tools/qtconfig/mainwindow.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index 81d7813..12024e7 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -178,7 +178,6 @@ static void setStyleHelper(QWidget *w, QStyle *s) w->setStyle(s); } - MainWindow::MainWindow() : QMainWindow(), editPalette(palette()), previewPalette(palette()), previewstyle(0) { @@ -477,7 +476,6 @@ MainWindow::MainWindow() updateStyleLayout(); } - MainWindow::~MainWindow() { } @@ -603,13 +601,11 @@ void MainWindow::fileSave() statusBar()->showMessage(QLatin1String("Saved changes.")); } - void MainWindow::fileExit() { qApp->closeAllWindows(); } - void MainWindow::setModified(bool m) { if (modified == m) @@ -619,7 +615,6 @@ void MainWindow::setModified(bool m) fileSaveAction->setEnabled(m); } - void MainWindow::buildPalette() { QPalette temp(buttonMainColor->color(), buttonWindowColor->color()); @@ -648,14 +643,12 @@ void MainWindow::setPreviewPalette( const QPalette& pal ) previewFrame->setPreviewPalette(previewPalette); } - void MainWindow::updateColorButtons() { buttonMainColor->setColor( editPalette.color( QPalette::Active, QPalette::Button )); buttonWindowColor->setColor( editPalette.color( QPalette::Active, QPalette::Window )); } - void MainWindow::tunePalette() { bool ok; @@ -669,7 +662,6 @@ void MainWindow::tunePalette() setModified(true); } - void MainWindow::paletteSelected(int) { setPreviewPalette(editPalette); @@ -700,7 +692,6 @@ void MainWindow::styleSelected(const QString &stylename) updateStyleLayout(); } - void MainWindow::familySelected(const QString &family) { QFontDatabase db; @@ -711,7 +702,6 @@ void MainWindow::familySelected(const QString &family) buildFont(); } - void MainWindow::buildFont() { QFontDatabase db; @@ -722,7 +712,6 @@ void MainWindow::buildFont() setModified(true); } - void MainWindow::substituteSelected(const QString &family) { QStringList subs = QFont::substitutes(family); @@ -730,7 +719,6 @@ void MainWindow::substituteSelected(const QString &family) sublistbox->insertItems(0, subs); } - void MainWindow::removeSubstitute() { if (!sublistbox->currentItem()) @@ -749,7 +737,6 @@ void MainWindow::removeSubstitute() setModified(true); } - void MainWindow::addSubstitute() { if (!sublistbox->currentItem()) { @@ -770,7 +757,6 @@ void MainWindow::addSubstitute() setModified(true); } - void MainWindow::downSubstitute() { if (!sublistbox->currentItem() || sublistbox->currentRow() >= sublistbox->count()) @@ -789,7 +775,6 @@ void MainWindow::downSubstitute() setModified(true); } - void MainWindow::upSubstitute() { if (!sublistbox->currentItem() || sublistbox->currentRow() < 1) @@ -808,7 +793,6 @@ void MainWindow::upSubstitute() setModified(true); } - void MainWindow::removeFontpath() { if (!fontpathlistbox->currentItem()) @@ -824,7 +808,6 @@ void MainWindow::removeFontpath() setModified(true); } - void MainWindow::addFontpath() { if (fontpathlineedit->text().isEmpty()) @@ -847,11 +830,12 @@ void MainWindow::addFontpath() setModified(true); } - void MainWindow::downFontpath() { - if (!fontpathlistbox->currentItem() || fontpathlistbox->currentRow() >= fontpathlistbox->count() - 1) + if (!fontpathlistbox->currentItem() + || fontpathlistbox->currentRow() >= (fontpathlistbox->count() - 1)) { return; + } int row = fontpathlistbox->currentRow(); QString fam = fontpaths.at(row); @@ -863,7 +847,6 @@ void MainWindow::downFontpath() setModified(true); } - void MainWindow::upFontpath() { if (!fontpathlistbox->currentItem() || fontpathlistbox->currentRow() < 1) @@ -879,7 +862,6 @@ void MainWindow::upFontpath() setModified(true); } - void MainWindow::browseFontpath() { QString dirname = QFileDialog::getExistingDirectory(this, tr("Select a Directory")); @@ -889,13 +871,11 @@ void MainWindow::browseFontpath() fontpathlineedit->setText(dirname); } - void MainWindow::somethingModified() { setModified(true); } - void MainWindow::helpAbout() { QMessageBox box(this); @@ -908,13 +888,11 @@ void MainWindow::helpAbout() box.exec(); } - void MainWindow::helpAboutQt() { QMessageBox::aboutQt(this, tr("Qt Configuration")); } - void MainWindow::pageChanged(QWidget *page) { if (page == tab) @@ -929,7 +907,6 @@ void MainWindow::pageChanged(QWidget *page) helpview->setText(tr(phonon_text)); } - void MainWindow::closeEvent(QCloseEvent *e) { if (modified) { |