#include "networkmodel.h"
#include "buffermodel.h"
#include "nicklistwidget.h"
-#include "nicklistdock.h"
#include "settingsdlg.h"
#include "settingspagedlg.h"
#include "signalproxy.h"
+++ /dev/null
-/***************************************************************************
- * 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 "nicklistdock.h"
-#include "qtuisettings.h"
-
-#include <QAction>
-#include <QDebug>
-#include <QEvent>
-#include <QAbstractButton>
-
-NickListDock::NickListDock(const QString &title, QWidget *parent)
- : QDockWidget(title, parent)
-{
- QAction *toggleView = toggleViewAction();
- disconnect(toggleView, SIGNAL(triggered(bool)), this, 0);
-
- foreach(QAbstractButton *button, findChildren<QAbstractButton *>()) {
- if(disconnect(button, SIGNAL(clicked()), this, SLOT(close())))
- connect(button, SIGNAL(clicked()), toggleView, SLOT(trigger()));
- }
-
- installEventFilter(this);
-
- toggleView->setChecked(QtUiSettings().value("ShowNickList", QVariant(true)).toBool());
-}
-
-NickListDock::~NickListDock() {
- QtUiSettings().setValue("ShowNickList", toggleViewAction()->isChecked());
-}
-
-bool NickListDock::eventFilter(QObject *watched, QEvent *event) {
- Q_UNUSED(watched)
- if(event->type() != QEvent::Hide && event->type() != QEvent::Show)
- return false;
-
- emit visibilityChanged(event->type() == QEvent::Show);
-
- return true;
-}
+++ /dev/null
-/***************************************************************************
- * 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 NICKLISTDOCK_H
-#define NICKLISTDOCK_H
-
-#include <QDockWidget>
-
-class NickListDock : public QDockWidget {
- Q_OBJECT
-
-public:
- NickListDock(const QString &title, QWidget *parent = 0);
- ~NickListDock();
-
- virtual bool eventFilter(QObject *watched, QEvent *event);
-};
-
-#endif //NICKLISTDOCK_H
#include "nickviewfilter.h"
#include "qtuisettings.h"
-#include <QDockWidget>
+#include <QAction>
+#include <QDebug>
+#include <QEvent>
+#include <QAbstractButton>
NickListWidget::NickListWidget(QWidget *parent)
: AbstractItemView(parent)
else
return currentWidget->sizeHint();
}
+
+
+// ==============================
+// NickList Dock
+// ==============================
+NickListDock::NickListDock(const QString &title, QWidget *parent)
+ : QDockWidget(title, parent)
+{
+ QAction *toggleView = toggleViewAction();
+ disconnect(toggleView, SIGNAL(triggered(bool)), this, 0);
+ toggleView->setChecked(QtUiSettings().value("ShowNickList", QVariant(true)).toBool());
+
+ // reconnecting the closebuttons clicked signal to the action
+ foreach(QAbstractButton *button, findChildren<QAbstractButton *>()) {
+ if(disconnect(button, SIGNAL(clicked()), this, SLOT(close())))
+ connect(button, SIGNAL(clicked()), toggleView, SLOT(trigger()));
+ }
+}
+
+NickListDock::~NickListDock() {
+ QtUiSettings().setValue("ShowNickList", toggleViewAction()->isChecked());
+}
+
+bool NickListDock::event(QEvent *event) {
+ switch (event->type()) {
+ case QEvent::Hide:
+ case QEvent::Show:
+ emit visibilityChanged(event->type() == QEvent::Show);
+ return QWidget::event(event);
+ default:
+ return QDockWidget::event(event);
+ }
+}
#include "ui_nicklistwidget.h"
#include "abstractitemview.h"
+#include "buffermodel.h"
#include "types.h"
#include <QHash>
-
-#include "buffermodel.h"
+#include <QDockWidget>
class Buffer;
class NickView;
QDockWidget *dock() const;
};
+
+// ==============================
+// NickList Dock
+// ==============================
+class NickListDock : public QDockWidget {
+ Q_OBJECT
+
+public:
+ NickListDock(const QString &title, QWidget *parent = 0);
+ ~NickListDock();
+
+ virtual bool event(QEvent *event);
+};
+
#endif
SRCS += aboutdlg.cpp bufferwidget.cpp chatitem.cpp chatline.cpp chatline-old.cpp chatscene.cpp chatview.cpp chatwidget.cpp \
coreconfigwizard.cpp coreconnectdlg.cpp configwizard.cpp debugconsole.cpp inputwidget.cpp \
- mainwin.cpp nicklistdock.cpp nicklistwidget.cpp qtui.cpp qtuisettings.cpp qtuistyle.cpp settingsdlg.cpp settingspagedlg.cpp \
+ mainwin.cpp nicklistwidget.cpp qtui.cpp qtuisettings.cpp qtuistyle.cpp settingsdlg.cpp settingspagedlg.cpp \
topicbutton.cpp topicwidget.cpp verticaldock.cpp jumpkeyhandler.cpp
HDRS += aboutdlg.h bufferwidget.h chatitem.h chatline.h chatline-old.h chatscene.h chatview.h chatwidget.h \
coreconfigwizard.h configwizard.h debugconsole.h inputwidget.h \
- coreconnectdlg.h mainwin.h nicklistdock.h nicklistwidget.h qtui.h qtuisettings.h qtuistyle.h settingsdlg.h settingspagedlg.h \
+ coreconnectdlg.h mainwin.h nicklistwidget.h qtui.h qtuisettings.h qtuistyle.h settingsdlg.h settingspagedlg.h \
topicbutton.h topicwidget.h verticaldock.h jumpkeyhandler.h
FORMNAMES = aboutdlg.ui mainwin.ui coreaccounteditdlg.ui coreconnectdlg.ui bufferviewwidget.ui bufferwidget.ui nicklistwidget.ui settingsdlg.ui \
quasselVersion = "0.2.0-alpha5-pre";
quasselDate = "2008-03-31";
- quasselBuild = 673;
+ quasselBuild = 675;
//! Minimum client build number the core needs
clientBuildNeeded = 642;