INCLUDE_DIRECTORIES(${SDIRS})
# We need Qt4 support.
+SET(QT_MIN_VERSION "4.2.0")
FIND_PACKAGE(Qt4 REQUIRED)
# Set needed libraries
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>IdentitiesDlg</class>
<widget class="QDialog" name="IdentitiesDlg" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
- <width>383</width>
- <height>390</height>
+ <width>454</width>
+ <height>442</height>
</rect>
</property>
<property name="sizePolicy" >
</item>
<item>
<widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
<widget class="QWidget" name="generalTab" >
<attribute name="title" >
<string>&General</string>
</widget>
</item>
</layout>
- <widget class="QWidget" name="widget" >
+ <widget class="QWidget" native="1" name="widget" >
<property name="geometry" >
<rect>
<x>10</x>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>131</width>
- <height>31</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="okButton" >
- <property name="text" >
- <string>OK</string>
- </property>
- <property name="icon" >
- <iconset resource="../images/icons.qrc" >:/default/button_ok.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="cancelButton" >
- <property name="text" >
- <string>Cancel</string>
- </property>
- <property name="icon" >
- <iconset resource="../images/icons.qrc" >:/default/button_cancel.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
</layout>
</widget>
- <pixmapfunction></pixmapfunction>
<resources>
<include location="../images/icons.qrc" />
</resources>
<connections>
- <connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
- <receiver>IdentitiesDlg</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>356</x>
- <y>372</y>
- </hint>
- <hint type="destinationlabel" >
- <x>96</x>
- <y>254</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
- <receiver>IdentitiesDlg</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>447</x>
- <y>372</y>
- </hint>
- <hint type="destinationlabel" >
- <x>179</x>
- <y>282</y>
- </hint>
- </hints>
- </connection>
<connection>
<sender>enableAwayNick</sender>
<signal>clicked(bool)</signal>
</hint>
</hints>
</connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>IdentitiesDlg</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>226</x>
+ <y>420</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>226</x>
+ <y>220</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>IdentitiesDlg</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>226</x>
+ <y>420</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>226</x>
+ <y>220</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
</ui>
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>IdentitiesEditDlg</class>
<widget class="QDialog" name="IdentitiesEditDlg" >
<property name="geometry" >
</layout>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>131</width>
- <height>31</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="okButton" >
- <property name="text" >
- <string>&OK</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="cancelButton" >
- <property name="text" >
- <string>&Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
</layout>
</widget>
- <pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
<receiver>IdentitiesEditDlg</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
- <x>278</x>
- <y>253</y>
+ <x>190</x>
+ <y>213</y>
</hint>
<hint type="destinationlabel" >
- <x>96</x>
- <y>254</y>
+ <x>190</x>
+ <y>117</y>
</hint>
</hints>
</connection>
<connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
<receiver>IdentitiesEditDlg</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
- <x>369</x>
- <y>253</y>
+ <x>190</x>
+ <y>213</y>
</hint>
<hint type="destinationlabel" >
- <x>179</x>
- <y>282</y>
+ <x>190</x>
+ <y>117</y>
</hint>
</hints>
</connection>
cw->showMaximized();
//setEnabled(true);
statusBar()->showMessage(tr("Ready."));
+ //QSystemTrayIcon *systray = new QSystemTrayIcon(QIcon(":/qirc-icon.png"));
+ //systray->showMessage("Quassel", "Started!");
}
void MainWin::syncToCore() {
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>NetworkEditDlg</class>
<widget class="QDialog" name="NetworkEditDlg" >
<property name="geometry" >
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
- <number>8</number>
+ <number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
</widget>
</item>
+ <item>
+ <widget class="QWidget" native="1" name="widget" />
+ </item>
<item>
<widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
<widget class="QWidget" name="tab" >
<attribute name="title" >
<string>Servers</string>
</layout>
</item>
</layout>
- <widget class="QWidget" name="" >
+ <widget class="QWidget" native="1" name="widget" >
<property name="geometry" >
<rect>
<x>230</x>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
+ <widget class="QWidget" native="1" name="layoutWidget" />
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>275</width>
- <height>31</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="okButton" >
- <property name="text" >
- <string>OK</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="cancelButton" >
- <property name="text" >
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
</layout>
- <widget class="QWidget" name="" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>110</y>
- <width>461</width>
- <height>331</height>
- </rect>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget" >
- <property name="geometry" >
- <rect>
- <x>11</x>
- <y>407</y>
- <width>459</width>
- <height>33</height>
- </rect>
- </property>
- </widget>
</widget>
- <pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
<receiver>NetworkEditDlg</receiver>
- <slot>accept()</slot>
+ <slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
- <x>278</x>
- <y>253</y>
+ <x>216</x>
+ <y>435</y>
</hint>
<hint type="destinationlabel" >
- <x>96</x>
- <y>254</y>
+ <x>216</x>
+ <y>228</y>
</hint>
</hints>
</connection>
<connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
<receiver>NetworkEditDlg</receiver>
- <slot>reject()</slot>
+ <slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
- <x>369</x>
- <y>253</y>
+ <x>216</x>
+ <y>435</y>
</hint>
<hint type="destinationlabel" >
- <x>179</x>
- <y>282</y>
+ <x>216</x>
+ <y>228</y>
</hint>
</hints>
</connection>
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>NickEditDlg</class>
<widget class="QDialog" name="NickEditDlg" >
<property name="geometry" >
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
- <number>8</number>
+ <number>9</number>
</property>
<property name="spacing" >
<number>6</number>
<item>
<widget class="QLineEdit" name="lineEdit" />
</item>
+ <item>
+ <widget class="QWidget" native="1" name="widget" />
+ </item>
<item>
<spacer>
<property name="orientation" >
</property>
<property name="sizeHint" >
<size>
- <width>20</width>
- <height>40</height>
+ <width>291</width>
+ <height>16</height>
</size>
</property>
</spacer>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>131</width>
- <height>31</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="okButton" >
- <property name="text" >
- <string>OK</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="cancelButton" >
- <property name="text" >
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
</layout>
- <widget class="QWidget" name="" >
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>32</y>
- <width>325</width>
- <height>25</height>
- </rect>
- </property>
- </widget>
</widget>
- <pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
<receiver>NickEditDlg</receiver>
- <slot>accept()</slot>
+ <slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
- <x>278</x>
- <y>253</y>
+ <x>153</x>
+ <y>77</y>
</hint>
<hint type="destinationlabel" >
- <x>96</x>
- <y>254</y>
+ <x>153</x>
+ <y>47</y>
</hint>
</hints>
</connection>
<connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
<receiver>NickEditDlg</receiver>
- <slot>reject()</slot>
+ <slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
- <x>369</x>
- <y>253</y>
+ <x>153</x>
+ <y>77</y>
</hint>
<hint type="destinationlabel" >
- <x>179</x>
- <y>282</y>
+ <x>153</x>
+ <y>47</y>
</hint>
</hints>
</connection>
}
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);
}
void IdentitiesEditDlg::selectionChanged() {
- int idx = ui.identList->currentRow();
+ 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() {
}
void NickEditDlg::textChanged(QString text) {
- ui.okButton->setDisabled(text.isEmpty() || text == "");
+ ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(text.isEmpty() || text == "");
}
QString NickEditDlg::getNick() {
RenameIdentityDlg::RenameIdentityDlg(QWidget *parent, QList<QString> _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)));
}
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() {