summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/editormanager/openeditorsview.h
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-03-26 13:58:29 +0100
committermae <qt-info@nokia.com>2009-03-26 13:58:29 +0100
commitf1302b3b209517d19613913fc3269b6da51eaa8d (patch)
tree311ee80c6961a1406bc17d58b10184cf2fd95436 /src/plugins/coreplugin/editormanager/openeditorsview.h
parentf65ed2381697ad0f502008dd2474c429488a9bf2 (diff)
downloadqt-creator-f1302b3b209517d19613913fc3269b6da51eaa8d.tar.gz
Add close-document functionality to the "Open Documents" view. The close button is enabled
with mouse-over. The change makes the list behave more like tabs.
Diffstat (limited to 'src/plugins/coreplugin/editormanager/openeditorsview.h')
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorsview.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.h b/src/plugins/coreplugin/editormanager/openeditorsview.h
index 9030551699..45cfc62a01 100644
--- a/src/plugins/coreplugin/editormanager/openeditorsview.h
+++ b/src/plugins/coreplugin/editormanager/openeditorsview.h
@@ -40,6 +40,7 @@
#include <QtGui/QKeySequence>
#include <QtGui/QAbstractButton>
#include <QtGui/QTreeWidgetItem>
+#include <QtGui/QStyledItemDelegate>
namespace Core {
namespace Internal {
@@ -52,15 +53,9 @@ public:
OpenEditorsWidget();
~OpenEditorsWidget();
- bool eventFilter(QObject *obj, QEvent *event);
-
private slots:
void selectEditor(const QModelIndex &);
- void selectEditor();
- void closeEditors();
- void closeAllEditors();
void updateCurrentItem(Core::IEditor*);
- void putFocusToEditorList();
private:
Ui::OpenEditorsView m_ui;
@@ -80,4 +75,16 @@ public:
} // namespace Internal
} // namespace Core
+class OpenEditorsDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ OpenEditorsDelegate(QObject *parent = 0);
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+};
+
+
#endif // OPENEDITORSVIEW_H