summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-09-26 15:58:23 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-10-01 17:32:18 (GMT)
commit7e72c9caae6c522f6c64b357434396b633876509 (patch)
tree8cba1da70799c90527a5c38230bcca55063ac0e9 /Swift/QtUI/EventViewer
parentbe0d01be9d6e98c59c6484e3bd691c4354142c4c (diff)
downloadswift-7e72c9caae6c522f6c64b357434396b633876509.zip
swift-7e72c9caae6c522f6c64b357434396b633876509.tar.bz2
Preparations for adding subscription requests.
Diffstat (limited to 'Swift/QtUI/EventViewer')
-rw-r--r--Swift/QtUI/EventViewer/EventModel.cpp19
-rw-r--r--Swift/QtUI/EventViewer/EventModel.h15
-rw-r--r--Swift/QtUI/EventViewer/EventView.cpp2
-rw-r--r--Swift/QtUI/EventViewer/EventView.h4
4 files changed, 37 insertions, 3 deletions
diff --git a/Swift/QtUI/EventViewer/EventModel.cpp b/Swift/QtUI/EventViewer/EventModel.cpp
index 8b13789..a2343ed 100644
--- a/Swift/QtUI/EventViewer/EventModel.cpp
+++ b/Swift/QtUI/EventViewer/EventModel.cpp
@@ -1 +1,20 @@
+#include "EventModel.h"
+namespace Swift {
+EventModel::EventModel() {
+
+}
+
+EventModel::~EventModel() {
+
+}
+
+QVariant EventModel::data(const QModelIndex& index, int role) const {
+ return QVariant();
+}
+
+int EventModel::rowCount(const QModelIndex& parent) const {
+ return 0;
+}
+
+}
diff --git a/Swift/QtUI/EventViewer/EventModel.h b/Swift/QtUI/EventViewer/EventModel.h
index 8b13789..18195f1 100644
--- a/Swift/QtUI/EventViewer/EventModel.h
+++ b/Swift/QtUI/EventViewer/EventModel.h
@@ -1 +1,16 @@
+#pragma once
+#include <QAbstractListModel>
+#include <QList>
+
+namespace Swift {
+class EventModel : public QAbstractListModel {
+Q_OBJECT
+public:
+ EventModel();
+ ~EventModel();
+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
+ int rowCount(const QModelIndex& parent = QModelIndex()) const;
+};
+
+}
diff --git a/Swift/QtUI/EventViewer/EventView.cpp b/Swift/QtUI/EventViewer/EventView.cpp
index bd89f7a..c988685 100644
--- a/Swift/QtUI/EventViewer/EventView.cpp
+++ b/Swift/QtUI/EventViewer/EventView.cpp
@@ -1,7 +1,7 @@
#include "Swift/QtUI/EventViewer/EventView.h"
namespace Swift {
-EventView::EventView(QWidget* parent) : QWidget(parent) {
+EventView::EventView(QWidget* parent) : QListView(parent) {
}
diff --git a/Swift/QtUI/EventViewer/EventView.h b/Swift/QtUI/EventViewer/EventView.h
index c677e99..d17a704 100644
--- a/Swift/QtUI/EventViewer/EventView.h
+++ b/Swift/QtUI/EventViewer/EventView.h
@@ -1,9 +1,9 @@
#pragma once
-#include <QWidget>
+#include <QListView>
namespace Swift {
- class EventView : public QWidget {
+ class EventView : public QListView {
Q_OBJECT
public:
EventView(QWidget* parent);