From: Manuel Nickschas Date: Sat, 21 Oct 2006 15:35:54 +0000 (+0000) Subject: More small changes, working on the dialogs right now. X-Git-Tag: 0.1.0~266 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=63db3c5de9d76c5abc55b0cba86f66d2aba7745d More small changes, working on the dialogs right now. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 58a6b95b..eaf8be0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ ENDFOREACH(dir) INCLUDE_DIRECTORIES(${SDIRS}) # We need Qt4 support. +SET(QT_MIN_VERSION "4.2.0") FIND_PACKAGE(Qt4 REQUIRED) # Set needed libraries diff --git a/gui/identitiesdlg.ui b/gui/identitiesdlg.ui index d994b8ac..a05a8afc 100644 --- a/gui/identitiesdlg.ui +++ b/gui/identitiesdlg.ui @@ -1,15 +1,12 @@ - - - IdentitiesDlg 0 0 - 383 - 390 + 454 + 442 @@ -73,6 +70,9 @@ + + 0 + &General @@ -281,7 +281,7 @@ - + 10 @@ -519,87 +519,21 @@ - - - 0 + + + Qt::Horizontal - - 6 + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - Qt::Horizontal - - - - 131 - 31 - - - - - - - - OK - - - :/default/button_ok.png - - - - - - - Cancel - - - :/default/button_cancel.png - - - - + - - - okButton - clicked() - IdentitiesDlg - accept() - - - 356 - 372 - - - 96 - 254 - - - - - cancelButton - clicked() - IdentitiesDlg - reject() - - - 447 - 372 - - - 179 - 282 - - - enableAwayNick clicked(bool) @@ -696,5 +630,37 @@ + + buttonBox + rejected() + IdentitiesDlg + reject() + + + 226 + 420 + + + 226 + 220 + + + + + buttonBox + accepted() + IdentitiesDlg + accept() + + + 226 + 420 + + + 226 + 220 + + + diff --git a/gui/identitieseditdlg.ui b/gui/identitieseditdlg.ui index 9835e43c..05714b89 100644 --- a/gui/identitieseditdlg.ui +++ b/gui/identitieseditdlg.ui @@ -1,7 +1,4 @@ - - - IdentitiesEditDlg @@ -90,76 +87,48 @@ - - - 0 + + + Qt::Horizontal - - 6 + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - Qt::Horizontal - - - - 131 - 31 - - - - - - - - &OK - - - - - - - &Cancel - - - - + - - okButton - clicked() + buttonBox + accepted() IdentitiesEditDlg accept() - 278 - 253 + 190 + 213 - 96 - 254 + 190 + 117 - cancelButton - clicked() + buttonBox + rejected() IdentitiesEditDlg reject() - 369 - 253 + 190 + 213 - 179 - 282 + 190 + 117 diff --git a/gui/mainwin.cpp b/gui/mainwin.cpp index 49196f8c..3faaf109 100644 --- a/gui/mainwin.cpp +++ b/gui/mainwin.cpp @@ -61,6 +61,8 @@ MainWin::MainWin() : QMainWindow() { cw->showMaximized(); //setEnabled(true); statusBar()->showMessage(tr("Ready.")); + //QSystemTrayIcon *systray = new QSystemTrayIcon(QIcon(":/qirc-icon.png")); + //systray->showMessage("Quassel", "Started!"); } void MainWin::syncToCore() { diff --git a/gui/networkeditdlg.ui b/gui/networkeditdlg.ui index 3b1b5be2..6814051f 100644 --- a/gui/networkeditdlg.ui +++ b/gui/networkeditdlg.ui @@ -1,7 +1,4 @@ - - - NetworkEditDlg @@ -17,7 +14,7 @@ - 8 + 9 6 @@ -98,8 +95,14 @@ + + + + + 0 + Servers @@ -183,7 +186,7 @@ - + 230 @@ -230,96 +233,51 @@ - - - 0 + + + + + + Qt::Horizontal - - 6 + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - Qt::Horizontal - - - - 275 - 31 - - - - - - - - OK - - - - - - - Cancel - - - - + - - - - 10 - 110 - 461 - 331 - - - - - - - 11 - 407 - 459 - 33 - - - - - okButton - clicked() + buttonBox + rejected() NetworkEditDlg - accept() + reject() - 278 - 253 + 216 + 435 - 96 - 254 + 216 + 228 - cancelButton - clicked() + buttonBox + accepted() NetworkEditDlg - reject() + accept() - 369 - 253 + 216 + 435 - 179 - 282 + 216 + 228 diff --git a/gui/nickeditdlg.ui b/gui/nickeditdlg.ui index 01deb7f5..fbd82ca0 100644 --- a/gui/nickeditdlg.ui +++ b/gui/nickeditdlg.ui @@ -1,7 +1,4 @@ - - - NickEditDlg @@ -28,7 +25,7 @@ - 8 + 9 6 @@ -43,6 +40,9 @@ + + + @@ -50,93 +50,55 @@ - 20 - 40 + 291 + 16 - - - 0 + + + Qt::Horizontal - - 6 + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - Qt::Horizontal - - - - 131 - 31 - - - - - - - - OK - - - - - - - Cancel - - - - + - - - - 9 - 32 - 325 - 25 - - - - - okButton - clicked() + buttonBox + rejected() NickEditDlg - accept() + reject() - 278 - 253 + 153 + 77 - 96 - 254 + 153 + 47 - cancelButton - clicked() + buttonBox + accepted() NickEditDlg - reject() + accept() - 369 - 253 + 153 + 77 - 179 - 282 + 153 + 47 diff --git a/gui/serverlist.cpp b/gui/serverlist.cpp index 3053bfb1..8dbb4a1b 100644 --- a/gui/serverlist.cpp +++ b/gui/serverlist.cpp @@ -321,7 +321,8 @@ void IdentitiesDlg::autoAwayChecked() { } void IdentitiesDlg::nickSelectionChanged() { - int curidx = ui.nickList->currentRow(); + Q_ASSERT(ui.nickList->selectedItems().size() == 1); + int curidx = ui.nickList->row(ui.nickList->selectedItems()[0]); ui.editNickButton->setEnabled(curidx >= 0); ui.delNickButton->setEnabled(curidx >= 0); ui.upNickButton->setEnabled(curidx > 0); @@ -444,11 +445,11 @@ IdentitiesEditDlg::IdentitiesEditDlg(QWidget *parent, VarMap _identities, QMapcurrentRow(); + Q_ASSERT(ui.identList->selectedItems().size() == 1); + int idx = ui.identList->row(ui.identList->selectedItems()[0]); ui.duplicateButton->setEnabled(idx >= 0); ui.renameButton->setEnabled(idx > 0); ui.deleteButton->setEnabled(idx > 0); - } void IdentitiesEditDlg::addIdentity() { @@ -534,7 +535,7 @@ NickEditDlg::NickEditDlg(QWidget *parent, QString nick) : QDialog(parent) { } void NickEditDlg::textChanged(QString text) { - ui.okButton->setDisabled(text.isEmpty() || text == ""); + ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(text.isEmpty() || text == ""); } QString NickEditDlg::getNick() { @@ -546,7 +547,7 @@ QString NickEditDlg::getNick() { RenameIdentityDlg::RenameIdentityDlg(QWidget *parent, QList _reserved, QString name) : QDialog(parent) { ui.setupUi(this); reserved = _reserved; - //ui.NickEditDlg->setWindowTitle(tr("Edit Identity Name")); // why does this not work? + setWindowTitle(tr("Edit Identity Name")); ui.label->setText(tr("Identity:")); ui.lineEdit->setText(name); connect(ui.lineEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString))); @@ -554,8 +555,8 @@ RenameIdentityDlg::RenameIdentityDlg(QWidget *parent, QList _reserved, } void RenameIdentityDlg::textChanged(QString text) { - if(text.length() == 0) { ui.okButton->setEnabled(0); return; } - ui.okButton->setDisabled(reserved.contains(text)); + if(text.length() == 0) { ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(true); return; } + ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(reserved.contains(text)); } QString RenameIdentityDlg::getName() {