Haha! The Inputline is now a seperate dock! Sput: I told you that I'll make it :P
authorMarcus Eggenberger <egs@quassel-irc.org>
Sat, 26 Jan 2008 20:59:02 +0000 (20:59 +0000)
committerMarcus Eggenberger <egs@quassel-irc.org>
Sat, 26 Jan 2008 20:59:02 +0000 (20:59 +0000)
Well that means the input line can now be moved around or undocked or even hidden.
This new dock aswell as the topic dock have new vertical layouted titlewidget.

16 files changed:
src/client/client.h
src/client/networkmodel.cpp
src/client/networkmodel.h
src/qtui/bufferwidget.cpp
src/qtui/bufferwidget.h
src/qtui/inputwidget.cpp [new file with mode: 0644]
src/qtui/inputwidget.h [new file with mode: 0644]
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/qtui.pri
src/qtui/ui/bufferwidget.ui
src/qtui/ui/inputwidget.ui [new file with mode: 0644]
src/uisupport/uisupport.pri
src/uisupport/verticaldocktitle.cpp [new file with mode: 0644]
src/uisupport/verticaldocktitle.h [new file with mode: 0644]
version.inc

index 6daa757..32ae3a9 100644 (file)
@@ -155,14 +155,13 @@ public slots:
 
   void setCoreConfiguration(const QVariantMap &settings);
 
 
   void setCoreConfiguration(const QVariantMap &settings);
 
+  void userInput(BufferInfo, QString);
 
 private slots:
   void recvSessionData(const QString &key, const QVariant &data);
 
   //void coreSocketError(QAbstractSocket::SocketError);
 
 
 private slots:
   void recvSessionData(const QString &key, const QVariant &data);
 
   //void coreSocketError(QAbstractSocket::SocketError);
 
-  void userInput(BufferInfo, QString);
-
   //void networkConnected(NetworkId);
   //void networkDisconnected(NetworkId);
 
   //void networkConnected(NetworkId);
   //void networkDisconnected(NetworkId);
 
index 8b9dfad..83716ee 100644 (file)
@@ -97,6 +97,8 @@ QVariant BufferItem::data(int column, int role) const {
     return qVariantFromValue(bufferInfo().uid());
   case NetworkModel::NetworkIdRole:
     return qVariantFromValue(bufferInfo().networkId());
     return qVariantFromValue(bufferInfo().uid());
   case NetworkModel::NetworkIdRole:
     return qVariantFromValue(bufferInfo().networkId());
+  case NetworkModel::BufferInfoRole:
+    return qVariantFromValue(bufferInfo());
   case NetworkModel::BufferTypeRole:
     return int(bufferType());
   case NetworkModel::ItemActiveRole:
   case NetworkModel::BufferTypeRole:
     return int(bufferType());
   case NetworkModel::ItemActiveRole:
index d891dd0..dfea333 100644 (file)
@@ -203,6 +203,7 @@ public:
     ItemActiveRole,
     BufferIdRole,
     NetworkIdRole,
     ItemActiveRole,
     BufferIdRole,
     NetworkIdRole,
+    BufferInfoRole,
     ItemTypeRole
   };
 
     ItemTypeRole
   };
 
index 4b43968..99a2f30 100644 (file)
@@ -34,9 +34,6 @@ BufferWidget::BufferWidget(QWidget *parent)
     _selectionModel(0)
 {
   ui.setupUi(this);
     _selectionModel(0)
 {
   ui.setupUi(this);
-  ui.ownNick->clear();  // TODO add nick history
-  connect(ui.inputEdit, SIGNAL(returnPressed()), this, SLOT(enterPressed()));
-  connect(ui.ownNick, SIGNAL(activated(QString)), this, SLOT(changeNick(QString)));
 }
 
 BufferWidget::~BufferWidget() {
 }
 
 BufferWidget::~BufferWidget() {
@@ -112,7 +109,6 @@ void BufferWidget::currentChanged(const QModelIndex &current, const QModelIndex
     return;
   
   setCurrentBuffer(qVariantValue<BufferId>(variant));
     return;
   
   setCurrentBuffer(qVariantValue<BufferId>(variant));
-  updateNickSelector();
 }
 
 void BufferWidget::setCurrentBuffer(BufferId bufferId) {
 }
 
 void BufferWidget::setCurrentBuffer(BufferId bufferId) {
@@ -137,62 +133,9 @@ void BufferWidget::setCurrentBuffer(BufferId bufferId) {
     connect(buf, SIGNAL(msgPrepended(AbstractUiMsg *)), chatWidget, SLOT(prependMsg(AbstractUiMsg *)));
     _chatWidgets[bufferId] = chatWidget;
     ui.stackedWidget->addWidget(chatWidget);
     connect(buf, SIGNAL(msgPrepended(AbstractUiMsg *)), chatWidget, SLOT(prependMsg(AbstractUiMsg *)));
     _chatWidgets[bufferId] = chatWidget;
     ui.stackedWidget->addWidget(chatWidget);
+    chatWidget->setFocusProxy(this);
   }
   ui.stackedWidget->setCurrentWidget(chatWidget);
   }
   ui.stackedWidget->setCurrentWidget(chatWidget);
-  disconnect(this, SIGNAL(userInput(QString)), 0, 0);
-  connect(this, SIGNAL(userInput(QString)), Client::buffer(bufferId), SLOT(processUserInput(QString)));
-  chatWidget->setFocusProxy(ui.inputEdit);
-  ui.inputEdit->setFocus();
-
-}
-
-const Network *BufferWidget::currentNetwork() const {
-  if(!selectionModel())
-    return 0;
-
-  QVariant variant = selectionModel()->currentIndex().data(NetworkModel::NetworkIdRole);
-  if(!variant.isValid())
-    return 0;
-
-  return Client::network(variant.value<NetworkId>());
-}
-
-void BufferWidget::updateNickSelector() const {
-  const Network *net = currentNetwork();
-  if(!net)
-    return;
-
-  const Identity *identity = Client::identity(net->identity());
-  if(!identity) {
-    qWarning() << "BufferWidget::setCurrentNetwork(): can't find Identity for Network" << net->networkId();
-    return;
-  }
-
-  int nickIdx;
-  QStringList nicks = identity->nicks();
-  if((nickIdx = nicks.indexOf(net->myNick())) == -1) {
-    nicks.prepend(net->myNick());
-    nickIdx = 0;
-  }
-  
-  ui.ownNick->clear();
-  ui.ownNick->addItems(nicks);
-  ui.ownNick->setCurrentIndex(nickIdx);
-}
-
-void BufferWidget::changeNick(const QString &newNick) const {
-  const Network *net = currentNetwork();
-  if(!net || net->isMyNick(newNick))
-    return;
-  emit userInput(QString("/nick %1").arg(newNick));
-}
-
-void BufferWidget::enterPressed() {
-  QStringList lines = ui.inputEdit->text().split('\n', QString::SkipEmptyParts);
-  foreach(QString msg, lines) {
-    if(msg.isEmpty()) continue;
-    emit userInput(msg);
-  }
-  ui.inputEdit->clear();
+  setFocus();
 }
 
 }
 
index da4d886..b9235f9 100644 (file)
@@ -29,7 +29,6 @@
 class Network;
 class ChatView;
 class ChatWidget;
 class Network;
 class ChatView;
 class ChatWidget;
-class LayoutThread;
 
 #include "buffermodel.h"
 #include <QItemSelectionModel>
 
 #include "buffermodel.h"
 #include <QItemSelectionModel>
@@ -50,13 +49,7 @@ public:
 
   inline QItemSelectionModel *selectionModel() const { return _selectionModel; }
   void setSelectionModel(QItemSelectionModel *selectionModel);
 
   inline QItemSelectionModel *selectionModel() const { return _selectionModel; }
   void setSelectionModel(QItemSelectionModel *selectionModel);
-
-  const Network *currentNetwork() const;
   
   
-signals:
-  void userInput(QString msg) const;
-  void aboutToClose();
-
 protected slots:
 //   virtual void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint);
 //   virtual void commitData(QWidget *editor);
 protected slots:
 //   virtual void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint);
 //   virtual void commitData(QWidget *editor);
@@ -68,12 +61,8 @@ protected slots:
 //   virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
 
 private slots:
 //   virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
 
 private slots:
-  void enterPressed();
-  void changeNick(const QString &newNick) const;
   void removeBuffer(BufferId bufferId);
   void removeBuffer(BufferId bufferId);
-
   void setCurrentBuffer(BufferId bufferId);
   void setCurrentBuffer(BufferId bufferId);
-  void updateNickSelector() const;
 
 private:
   Ui::BufferWidget ui;
 
 private:
   Ui::BufferWidget ui;
diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp
new file mode 100644 (file)
index 0000000..af6d25a
--- /dev/null
@@ -0,0 +1,119 @@
+/***************************************************************************
+ *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#include "inputwidget.h"
+
+#include "client.h"
+#include "networkmodel.h"
+#include "network.h"
+#include "identity.h"
+
+InputWidget::InputWidget(QWidget *parent)
+  : QWidget(parent),
+    validBuffer(false),
+    _bufferModel(0),
+    _selectionModel(0)
+{
+  ui.setupUi(this);
+  connect(ui.inputEdit, SIGNAL(returnPressed()), this, SLOT(enterPressed()));
+  connect(ui.ownNick, SIGNAL(activated(QString)), this, SLOT(changeNick(QString)));
+  connect(this, SIGNAL(userInput(BufferInfo, QString)), Client::instance(), SLOT(userInput(BufferInfo, QString)));
+  setFocusProxy(ui.inputEdit);
+}
+
+InputWidget::~InputWidget() {
+}
+
+void InputWidget::setModel(BufferModel *bufferModel) {
+  _bufferModel = bufferModel;
+}
+
+void InputWidget::setSelectionModel(QItemSelectionModel *selectionModel) {
+  if(_selectionModel) {
+    disconnect(_selectionModel, 0, this, 0);
+  }
+  _selectionModel = selectionModel;
+  connect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
+         this, SLOT(currentChanged(QModelIndex, QModelIndex)));
+}
+
+void InputWidget::currentChanged(const QModelIndex &current, const QModelIndex &previous) {
+  Q_UNUSED(previous);
+
+  validBuffer = current.isValid();
+
+  if(!validBuffer)
+    return;
+  
+  QVariant variant;
+  variant = current.data(NetworkModel::BufferInfoRole);
+  if(!variant.isValid())
+    return;
+
+  currentBufferInfo  = current.data(NetworkModel::BufferInfoRole).value<BufferInfo>();
+  updateNickSelector();
+}
+
+const Network *InputWidget::currentNetwork() const {
+  if(!validBuffer)
+    return 0;
+
+  return Client::network(currentBufferInfo.networkId());
+}
+
+void InputWidget::updateNickSelector() const {
+  const Network *net = currentNetwork();
+  if(!net)
+    return;
+
+  const Identity *identity = Client::identity(net->identity());
+  if(!identity) {
+    qWarning() << "InputWidget::updateNickSelector(): can't find Identity for Network" << net->networkId();
+    return;
+  }
+
+  int nickIdx;
+  QStringList nicks = identity->nicks();
+  if((nickIdx = nicks.indexOf(net->myNick())) == -1) {
+    nicks.prepend(net->myNick());
+    nickIdx = 0;
+  }
+  
+  ui.ownNick->clear();
+  ui.ownNick->addItems(nicks);
+  ui.ownNick->setCurrentIndex(nickIdx);
+}
+
+void InputWidget::changeNick(const QString &newNick) const {
+  const Network *net = currentNetwork();
+  if(!net || net->isMyNick(newNick))
+    return;
+  emit userInput(currentBufferInfo, QString("/nick %1").arg(newNick));
+}
+
+void InputWidget::enterPressed() {
+  QStringList lines = ui.inputEdit->text().split('\n', QString::SkipEmptyParts);
+  foreach(QString msg, lines) {
+    if(msg.isEmpty()) continue;
+    emit userInput(currentBufferInfo, msg);
+  }
+  ui.inputEdit->clear();
+}
+
diff --git a/src/qtui/inputwidget.h b/src/qtui/inputwidget.h
new file mode 100644 (file)
index 0000000..01daa29
--- /dev/null
@@ -0,0 +1,78 @@
+/***************************************************************************
+ *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#ifndef INPUTWIDGET_H
+#define INPUTWIDGET_H
+
+#include "ui_inputwidget.h"
+#include <QPointer>
+#include <QItemSelectionModel>
+
+#include "buffermodel.h"
+#include "bufferinfo.h"
+
+class Network;
+
+class InputWidget : public QWidget {
+  Q_OBJECT
+
+public:
+  InputWidget(QWidget *parent = 0);
+  virtual ~InputWidget();
+
+  inline BufferModel *model() { return _bufferModel; }
+  void setModel(BufferModel *bufferModel);
+
+  inline QItemSelectionModel *selectionModel() const { return _selectionModel; }
+  void setSelectionModel(QItemSelectionModel *selectionModel);
+
+  const Network *currentNetwork() const;
+
+protected slots:
+//   virtual void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint);
+//   virtual void commitData(QWidget *editor);
+  virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous);
+//   virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+//   virtual void editorDestroyed(QObject *editor);
+//   virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
+//   virtual void rowsInserted(const QModelIndex &parent, int start, int end);
+//   virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
+
+private slots:
+  void enterPressed();
+  void changeNick(const QString &newNick) const;
+
+  void updateNickSelector() const;
+
+signals:
+  void userInput(BufferInfo, QString msg) const;
+
+private:
+  Ui::InputWidget ui;
+
+  bool validBuffer;
+  BufferInfo currentBufferInfo;
+  
+  QPointer<BufferModel> _bufferModel;
+  QPointer<QItemSelectionModel> _selectionModel;
+
+};
+
+#endif // INPUTWIDGET_H
index 817a762..9ebcca3 100644 (file)
@@ -32,6 +32,8 @@
 #include "settingsdlg.h"
 #include "signalproxy.h"
 #include "topicwidget.h"
 #include "settingsdlg.h"
 #include "signalproxy.h"
 #include "topicwidget.h"
+#include "inputwidget.h"
+#include "verticaldocktitle.h"
 #include "uisettings.h"
 
 #include "selectionmodelsynchronizer.h"
 #include "uisettings.h"
 
 #include "selectionmodelsynchronizer.h"
@@ -121,7 +123,6 @@ void MainWin::init() {
   
   
   // new Topic Stuff... should be probably refactored out into a separate method
   
   
   // new Topic Stuff... should be probably refactored out into a separate method
-  
   setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
   setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
 
   setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
   setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
 
@@ -129,20 +130,55 @@ void MainWin::init() {
   setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
 
 
   setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
 
 
-  QDockWidget *dock = new QDockWidget(tr("Topic Dock"), this);
-  dock->setObjectName("TopicDock");
-  dock->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
+  QDockWidget *topicDock = new QDockWidget(tr("Topic"), this);
+  topicDock->setObjectName("TopicDock");
+  topicDock->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
+
+  QWidget *oldDockTitle = topicDock->titleBarWidget();
+
+  QWidget *newDockTitle = new VerticalDockTitle(topicDock);
+  topicDock->setFeatures(topicDock->features() | QDockWidget::DockWidgetVerticalTitleBar);
+  topicDock->setTitleBarWidget(newDockTitle);
+  
+  if(oldDockTitle)
+    oldDockTitle->deleteLater();
+  
 
 
-  TopicWidget *topicwidget = new TopicWidget(dock);
-  dock->setWidget(topicwidget);
+  TopicWidget *topicwidget = new TopicWidget(topicDock);
+  topicDock->setWidget(topicwidget);
 
   Client::bufferModel()->mapProperty(1, Qt::DisplayRole, topicwidget, "topic");
 
 
   Client::bufferModel()->mapProperty(1, Qt::DisplayRole, topicwidget, "topic");
 
-  addDockWidget(Qt::TopDockWidgetArea, dock);
+  addDockWidget(Qt::TopDockWidgetArea, topicDock);
 
 
-  ui.menuViews->addAction(dock->toggleViewAction());
+  ui.menuViews->addAction(topicDock->toggleViewAction());
 
 
+  // NEW INPUT WIDGET -- damn init() needs a cleanup
+  QDockWidget *inputDock = new QDockWidget(tr("Inputline"), this);
+  inputDock->setObjectName("InputDock");
+  inputDock->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
 
 
+  oldDockTitle = inputDock->titleBarWidget();
+  newDockTitle = new VerticalDockTitle(inputDock);
+  
+  inputDock->setFeatures(inputDock->features() | QDockWidget::DockWidgetVerticalTitleBar);
+  inputDock->setTitleBarWidget(newDockTitle);
+  
+  if(oldDockTitle)
+    oldDockTitle->deleteLater();
+  
+  InputWidget *inputWidget = new InputWidget(inputDock);
+  inputDock->setWidget(inputWidget);
+
+  addDockWidget(Qt::BottomDockWidgetArea, inputDock);
+  ui.menuViews->addAction(inputDock->toggleViewAction());
+
+
+  inputWidget->setModel(Client::bufferModel());
+  inputWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
+
+  ui.bufferWidget->setFocusProxy(inputWidget);
+  
   // attach the BufferWidget to the PropertyMapper
   ui.bufferWidget->setModel(Client::bufferModel());
   ui.bufferWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
   // attach the BufferWidget to the PropertyMapper
   ui.bufferWidget->setModel(Client::bufferModel());
   ui.bufferWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
@@ -309,4 +345,4 @@ void MainWin::systrayActivated( QSystemTrayIcon::ActivationReason activationReas
   
   
   
   
   
   
-}
\ No newline at end of file
+}
index 3f262d4..76f1dea 100644 (file)
@@ -26,6 +26,8 @@
 #include "qtui.h"
 #include "bufferviewfilter.h"
 
 #include "qtui.h"
 #include "bufferviewfilter.h"
 
+#include <QSystemTrayIcon>
+
 class ServerListDlg;
 class CoreConnectDlg;
 class Buffer;
 class ServerListDlg;
 class CoreConnectDlg;
 class Buffer;
@@ -33,7 +35,6 @@ class SettingsDlg;
 class QtUi;
 class Message;
 class NickListWidget;
 class QtUi;
 class Message;
 class NickListWidget;
-
 class DebugConsole;
 
 //!\brief The main window of Quassel's QtUi.
 class DebugConsole;
 
 //!\brief The main window of Quassel's QtUi.
index 13a9d6a..9497b5a 100644 (file)
@@ -4,15 +4,15 @@ QT_MOD = core gui network
 SRCS += bufferwidget.cpp chatline-old.cpp \
         chatwidget.cpp coreconnectdlg.cpp configwizard.cpp \
         guisettings.cpp identities.cpp mainwin.cpp nicklistwidget.cpp qtui.cpp qtuistyle.cpp serverlist.cpp settingsdlg.cpp \
 SRCS += bufferwidget.cpp chatline-old.cpp \
         chatwidget.cpp coreconnectdlg.cpp configwizard.cpp \
         guisettings.cpp identities.cpp mainwin.cpp nicklistwidget.cpp qtui.cpp qtuistyle.cpp serverlist.cpp settingsdlg.cpp \
-        topicwidget.cpp debugconsole.cpp
+        topicwidget.cpp debugconsole.cpp inputwidget.cpp
 
 HDRS += bufferwidget.h chatline-old.h chatwidget.h configwizard.h \
         coreconnectdlg.h guisettings.h identities.h mainwin.h nicklistwidget.h qtui.h qtuistyle.h serverlist.h settingsdlg.h \
 
 HDRS += bufferwidget.h chatline-old.h chatwidget.h configwizard.h \
         coreconnectdlg.h guisettings.h identities.h mainwin.h nicklistwidget.h qtui.h qtuistyle.h serverlist.h settingsdlg.h \
-        topicwidget.h debugconsole.h
+        topicwidget.h debugconsole.h inputwidget.h
 
 FORMNAMES = identitiesdlg.ui identitieseditdlg.ui networkeditdlg.ui mainwin.ui nickeditdlg.ui serverlistdlg.ui \
             servereditdlg.ui coreaccounteditdlg.ui coreconnectdlg.ui bufferviewwidget.ui bufferwidget.ui nicklistwidget.ui settingsdlg.ui \
 
 FORMNAMES = identitiesdlg.ui identitieseditdlg.ui networkeditdlg.ui mainwin.ui nickeditdlg.ui serverlistdlg.ui \
             servereditdlg.ui coreaccounteditdlg.ui coreconnectdlg.ui bufferviewwidget.ui bufferwidget.ui nicklistwidget.ui settingsdlg.ui \
-            topicwidget.ui debugconsole.ui
+            topicwidget.ui debugconsole.ui inputwidget.ui
 
 for(ui, FORMNAMES) {
   FRMS += ui/$${ui}
 
 for(ui, FORMNAMES) {
   FRMS += ui/$${ui}
index 9a80955..871d9ff 100644 (file)
@@ -124,55 +124,8 @@ p, li { white-space: pre-wrap; }
      </widget>
     </widget>
    </item>
      </widget>
     </widget>
    </item>
-   <item>
-    <layout class="QHBoxLayout" >
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <property name="leftMargin" >
-      <number>0</number>
-     </property>
-     <property name="topMargin" >
-      <number>0</number>
-     </property>
-     <property name="rightMargin" >
-      <number>0</number>
-     </property>
-     <property name="bottomMargin" >
-      <number>0</number>
-     </property>
-     <item>
-      <widget class="QComboBox" name="ownNick" >
-       <property name="sizeAdjustPolicy" >
-        <enum>QComboBox::AdjustToContents</enum>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="InputLine" name="inputEdit" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
   </layout>
  </widget>
   </layout>
  </widget>
- <customwidgets>
-  <customwidget>
-   <class>InputLine</class>
-   <extends>QLineEdit</extends>
-   <header>inputline.h</header>
-  </customwidget>
- </customwidgets>
- <tabstops>
-  <tabstop>inputEdit</tabstop>
-  <tabstop>ownNick</tabstop>
- </tabstops>
  <resources/>
  <connections/>
 </ui>
  <resources/>
  <connections/>
 </ui>
diff --git a/src/qtui/ui/inputwidget.ui b/src/qtui/ui/inputwidget.ui
new file mode 100644 (file)
index 0000000..349bc8d
--- /dev/null
@@ -0,0 +1,45 @@
+<ui version="4.0" >
+ <class>InputWidget</class>
+ <widget class="QWidget" name="InputWidget" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>674</width>
+    <height>136</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" >
+   <property name="leftMargin" >
+    <number>0</number>
+   </property>
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QComboBox" name="ownNick" />
+   </item>
+   <item>
+    <widget class="InputLine" name="inputEdit" />
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>InputLine</class>
+   <extends>QLineEdit</extends>
+   <header>inputline.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
index f7f0e89..970d6b9 100644 (file)
@@ -1,8 +1,8 @@
 DEPMOD = common client
 QT_MOD = core gui network
 
 DEPMOD = common client
 QT_MOD = core gui network
 
-SRCS += bufferview.cpp bufferviewfilter.cpp inputline.cpp nickview.cpp settingspage.cpp tabcompleter.cpp uisettings.cpp uistyle.cpp uistylesettings.cpp
-HDRS += bufferview.h bufferviewfilter.h inputline.h nickview.h settingspage.h tabcompleter.h uisettings.h uistyle.h uistylesettings.h
+SRCS += bufferview.cpp bufferviewfilter.cpp inputline.cpp nickview.cpp settingspage.cpp tabcompleter.cpp uisettings.cpp uistyle.cpp uistylesettings.cpp verticaldocktitle.cpp
+HDRS += bufferview.h bufferviewfilter.h inputline.h nickview.h settingspage.h tabcompleter.h uisettings.h uistyle.h uistylesettings.h verticaldocktitle.h
 
 FORMNAMES = 
 
 
 FORMNAMES = 
 
diff --git a/src/uisupport/verticaldocktitle.cpp b/src/uisupport/verticaldocktitle.cpp
new file mode 100644 (file)
index 0000000..acb0a11
--- /dev/null
@@ -0,0 +1,57 @@
+/***************************************************************************
+ *   Copyright (C) 2005/06 by the Quassel Project                          *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#include "verticaldocktitle.h"
+#include <QDockWidget>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <QDebug>
+
+VerticalDockTitle::VerticalDockTitle(QDockWidget *parent)
+  : QWidget(parent)
+{
+}
+
+VerticalDockTitle::~VerticalDockTitle() {
+}
+
+QSize VerticalDockTitle::sizeHint() const {
+  return QSize(10, 20);
+}
+
+QSize VerticalDockTitle::minimumSizeHint() const {
+  return QSize(10, 20);
+}
+
+void VerticalDockTitle::paintEvent(QPaintEvent *event) {
+  Q_UNUSED(event);
+  
+  QPainter painter(this);
+  
+  if(rect().isValid() && rect().height() > minimumSizeHint().height()) {
+    for(int i = 0; i < 2; i++) {
+      QPoint topLeft = rect().topLeft() + QPoint(3 + i*2, 5);
+      QPoint bottomRight = rect().topLeft() + QPoint(3 + i*2, rect().height() - 5);
+      qDrawShadeLine(&painter, topLeft, bottomRight, palette());
+    }
+  }
+  
+}
diff --git a/src/uisupport/verticaldocktitle.h b/src/uisupport/verticaldocktitle.h
new file mode 100644 (file)
index 0000000..4afb2d2
--- /dev/null
@@ -0,0 +1,45 @@
+/***************************************************************************
+ *   Copyright (C) 2005/06 by the Quassel Project                          *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#ifndef VERTICALDOCKTITLE_H
+#define VERTICALDOCKTITLE_H
+
+#include <QWidget>
+#include <QSize>
+
+class QDockWidget;
+
+class VerticalDockTitle : public QWidget {
+  Q_OBJECT
+
+public:
+  VerticalDockTitle(QDockWidget *parent);
+  virtual ~VerticalDockTitle();
+
+  virtual QSize sizeHint() const;
+  virtual QSize minimumSizeHint() const;
+
+protected:
+  virtual void paintEvent(QPaintEvent *event);
+};
+
+
+#endif // VERTICALDOCKTITLE_H
+  
index 4ea610d..b7b82f9 100644 (file)
@@ -4,8 +4,8 @@
 { using namespace Global;
 
   quasselVersion = "0.2.0-pre";
 { using namespace Global;
 
   quasselVersion = "0.2.0-pre";
-  quasselDate = "2008-01-23";
-  quasselBuild = 388;
+  quasselDate = "2008-01-26";
+  quasselBuild = 389;
 
   //! Minimum client build number the core needs
   clientBuildNeeded = 358;
 
   //! Minimum client build number the core needs
   clientBuildNeeded = 358;