projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added support for RichText input and conversion to mirc format
[quassel.git]
/
src
/
uisupport
/
bufferview.h
diff --git
a/src/uisupport/bufferview.h
b/src/uisupport/bufferview.h
index
6bbca4e
..
5d19a13
100644
(file)
--- a/
src/uisupport/bufferview.h
+++ b/
src/uisupport/bufferview.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
8
by the Quassel Project *
+ * Copyright (C) 2005-0
9
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-25,6
+25,7
@@
#include <QMenu>
#include <QDockWidget>
#include <QModelIndex>
#include <QMenu>
#include <QDockWidget>
#include <QModelIndex>
+#include <QStyledItemDelegate>
#include <QTreeView>
#include <QPointer>
#include <QTreeView>
#include <QPointer>
@@
-76,30
+77,37
@@
private slots:
void joinChannel(const QModelIndex &index);
void toggleHeader(bool checked);
void joinChannel(const QModelIndex &index);
void toggleHeader(bool checked);
- void on_collapse(const QModelIndex &index);
- void on_expand(const QModelIndex &index);
+ void storeExpandedState(const QModelIndex &networkIdx);
+ void setExpandedState(const QModelIndex &networkIdx);
+
void on_configChanged();
void on_configChanged();
+ void on_layoutChanged();
private:
QPointer<BufferViewConfig> _config;
private:
QPointer<BufferViewConfig> _config;
- QHash<NetworkId, bool> _expandedState;
- void storeExpandedState(NetworkId networkId, bool expanded);
+ enum ExpandedState {
+ WasExpanded = 0x01,
+ WasActive = 0x02
+ };
+ QHash<NetworkId, short> _expandedState;
+
};
// ******************************
};
// ******************************
-//
Tristate
Delgate
+//
BufferView
Delgate
// ******************************
// ******************************
-#include <QStyledItemDelegate>
-class
Tristate
Delegate : public QStyledItemDelegate {
+class
BufferView
Delegate : public QStyledItemDelegate {
Q_OBJECT
public:
Q_OBJECT
public:
- TristateDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}
+ BufferViewDelegate(QObject *parent = 0);
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
-};
+protected:
+ virtual void customEvent(QEvent *event);
+};
// ==============================
// BufferView Dock
// ==============================
// BufferView Dock
@@
-109,8
+117,9
@@
class BufferViewDock : public QDockWidget {
public:
BufferViewDock(BufferViewConfig *config, QWidget *parent);
public:
BufferViewDock(BufferViewConfig *config, QWidget *parent);
- BufferViewDock(QWidget *parent);
+ int bufferViewId() const;
+ BufferViewConfig *config() const;
inline BufferView *bufferView() const { return qobject_cast<BufferView *>(widget()); }
public slots:
inline BufferView *bufferView() const { return qobject_cast<BufferView *>(widget()); }
public slots: