From: Manuel Nickschas Date: Sat, 21 Oct 2006 00:27:11 +0000 (+0000) Subject: * Use Haui's new channelwidget. Yeah, it's still just a telnet client, but it looks... X-Git-Tag: 0.1.0~272 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=a7afccdbf779b959a4ce3fe88ec42590e3df6cfe;hp=8ce468c06d1faa05bd5402caef3bd6f27d13240c * Use Haui's new channelwidget. Yeah, it's still just a telnet client, but it looks prettier now. * Save/Restore MainWin size and pos. --- diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index d4d5ef11..8a8c328b 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,7 +1,7 @@ SET(gui_SRCS channelwidget.cpp mainwin.cpp serverlist.cpp coreconnectdlg.cpp guiproxy.cpp) SET(gui_HDRS ) SET(gui_MOCS channelwidget.h mainwin.h serverlist.h coreconnectdlg.h guiproxy.h) -SET(gui_UICS channelwidget-old.ui identitiesdlg.ui identitieseditdlg.ui networkeditdlg.ui nickeditdlg.ui serverlistdlg.ui coreconnectdlg.ui) +SET(gui_UICS channelwidget.ui identitiesdlg.ui identitieseditdlg.ui networkeditdlg.ui nickeditdlg.ui serverlistdlg.ui coreconnectdlg.ui) QT4_WRAP_UI(_UIC ${gui_UICS}) QT4_WRAP_CPP(_MOC ${gui_MOCS}) diff --git a/gui/channelwidget.cpp b/gui/channelwidget.cpp index 7ff45372..9cc05763 100644 --- a/gui/channelwidget.cpp +++ b/gui/channelwidget.cpp @@ -42,7 +42,7 @@ ChannelWidget::ChannelWidget(QWidget *parent) : QWidget(parent) { //connect(&core, SIGNAL(outputLine( const QString& )), ui.textBrowser, SLOT(insertPlainText(const QString &))); //connect(ui.lineEdit, SIGNAL( //connect(&core, SIGNAL(outputLine( const QString& )), this, SLOT(lineReceived(const QString &))); - connect(ui.lineEdit, SIGNAL(returnPressed()), this, SLOT(enterPressed())); + connect(ui.inputEdit, SIGNAL(returnPressed()), this, SLOT(enterPressed())); //connect(this, SIGNAL(inputLine( const QString& )), &core, SLOT(inputLine( const QString& ))); connect(this, SIGNAL(inputLine(QString)), guiProxy, SLOT(gsUserInput(QString))); @@ -54,11 +54,11 @@ ChannelWidget::ChannelWidget(QWidget *parent) : QWidget(parent) { } void ChannelWidget::enterPressed() { - emit inputLine(ui.lineEdit->text()); - ui.lineEdit->clear(); + emit inputLine(ui.inputEdit->text()); + ui.inputEdit->clear(); } void ChannelWidget::lineReceived(QString s) { - ui.textBrowser->insertPlainText(s + "\n"); - ui.textBrowser->ensureCursorVisible(); + ui.chatWidget->insertPlainText(s + "\n"); + ui.chatWidget->ensureCursorVisible(); } diff --git a/gui/channelwidget.h b/gui/channelwidget.h index cecde30d..932c5383 100644 --- a/gui/channelwidget.h +++ b/gui/channelwidget.h @@ -21,7 +21,7 @@ #ifndef _CHANNELWIDGET_H_ #define _CHANNELWIDGET_H_ -#include "ui_channelwidget-old.h" +#include "ui_channelwidget.h" class ChannelWidget : public QWidget { Q_OBJECT diff --git a/gui/channelwidget.ui b/gui/channelwidget.ui index 99b14489..f5bb9d85 100644 --- a/gui/channelwidget.ui +++ b/gui/channelwidget.ui @@ -1,12 +1,12 @@ - ChannelWin - + ChannelWidget + 0 0 - 595 - 407 + 723 + 546 @@ -15,15 +15,15 @@ YourNickname #quassel Network: The Topic - + 9 6 - - + + 0 @@ -31,193 +31,189 @@ 6 - - - 0 - - - 6 - - - - - - - - Qt::NonModal - - - - 0 - 0 - 0 - 0 - - - - Qt::LeftToRight - - - ... - - - - + - + + + Qt::NonModal + - 7 - 5 + 0 + 0 0 0 - - 1 + + Qt::LeftToRight + + + ... - - Qt::Horizontal + + + + + + + + + 7 + 5 + 0 + 0 + + + + 1 + + + Qt::Horizontal + + + + + 7 + 5 + 80 + 0 + + + + + + + 3 + 5 + 2 + 0 + + + + Qt::LeftToRight + + + true + + + Qt::ElideRight + + + false + + + true + + + 1 + + + + 32 Users - - - - 7 - 5 - 80 - 0 - + + + + @ Operators + + + + New Sub Item - - - - - 3 - 5 - 2 - 0 - + + + + New Item - - Qt::LeftToRight + + + + New Item - - true + + + + + 4 Voiced + + + + New Item - - Qt::ElideRight + + + + New Item - - 1 + + + + New Item - - - 32 Users - - - - - @ Operators - - - - New Item - - - - - New Sub Item - - - - - New Item - - - - - - 4 Voiced - - - - New Item - - - - - New Item - - - - - New Item - - - - - - 19 Users - - - - New Sub Item - - - - - New Item - - - - - New Item - - - - - New Item - - - - - - - - - - 0 - - - 6 + + + + + 19 Users - - - - mainNick - - - - - altNick - - - + + New Sub Item + - + + New Item + - + + + New Item + + + + + New Item + + + + + + + + + + 0 + + + 6 + + + + + + mainNick + + + + + altNick + + + + + + - lineEdit_2 - toolButton + topicEdit + chanSettingsButton diff --git a/gui/mainwin.cpp b/gui/mainwin.cpp index db8de04e..66b57548 100644 --- a/gui/mainwin.cpp +++ b/gui/mainwin.cpp @@ -19,6 +19,7 @@ ***************************************************************************/ #include +#include #include "global.h" @@ -32,6 +33,13 @@ MainWin::MainWin() : QMainWindow() { setWindowTitle("Quassel IRC"); setWindowIcon(QIcon(":/qirc-icon.png")); setWindowIconText("Quassel IRC"); + + QSettings s; + s.beginGroup("Geometry"); + resize(s.value("MainWinSize", QSize(500, 400)).toSize()); + move(s.value("MainWinPos", QPoint(50, 50)).toPoint()); + s.endGroup(); + //workspace = new QWorkspace(this); //setCentralWidget(workspace); //ChannelWidget *cw = new ChannelWidget(this); @@ -115,3 +123,16 @@ void MainWin::showServerList() { serverListDlg->show(); } +void MainWin::closeEvent(QCloseEvent *event) +{ + //if (userReallyWantsToQuit()) { + QSettings s; + s.beginGroup("Geometry"); + s.setValue("MainWinSize", size()); + s.setValue("MainWinPos", pos()); + s.endGroup(); + event->accept(); + //} else { + //event->ignore(); + //} +} diff --git a/gui/mainwin.h b/gui/mainwin.h index faaae576..9d7770f3 100644 --- a/gui/mainwin.h +++ b/gui/mainwin.h @@ -36,6 +36,7 @@ class MainWin : public QMainWindow { MainWin(); protected: + void closeEvent(QCloseEvent *event); private slots: void showServerList();