summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-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);