summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/EventViewer/EventDelegate.cpp1
-rw-r--r--Swift/QtUI/EventViewer/EventDelegate.h1
-rw-r--r--Swift/QtUI/EventViewer/EventModel.cpp1
-rw-r--r--Swift/QtUI/EventViewer/EventModel.h1
-rw-r--r--Swift/QtUI/EventViewer/EventView.cpp8
-rw-r--r--Swift/QtUI/EventViewer/EventView.h11
-rw-r--r--Swift/QtUI/QtMainWindow.cpp25
-rw-r--r--Swift/QtUI/QtMainWindow.h9
-rw-r--r--Swift/QtUI/SConscript3
9 files changed, 54 insertions, 6 deletions
diff --git a/Swift/QtUI/EventViewer/EventDelegate.cpp b/Swift/QtUI/EventViewer/EventDelegate.cpp
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Swift/QtUI/EventViewer/EventDelegate.cpp
@@ -0,0 +1 @@
+
diff --git a/Swift/QtUI/EventViewer/EventDelegate.h b/Swift/QtUI/EventViewer/EventDelegate.h
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Swift/QtUI/EventViewer/EventDelegate.h
@@ -0,0 +1 @@
+
diff --git a/Swift/QtUI/EventViewer/EventModel.cpp b/Swift/QtUI/EventViewer/EventModel.cpp
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Swift/QtUI/EventViewer/EventModel.cpp
@@ -0,0 +1 @@
+
diff --git a/Swift/QtUI/EventViewer/EventModel.h b/Swift/QtUI/EventViewer/EventModel.h
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Swift/QtUI/EventViewer/EventModel.h
@@ -0,0 +1 @@
+
diff --git a/Swift/QtUI/EventViewer/EventView.cpp b/Swift/QtUI/EventViewer/EventView.cpp
new file mode 100644
index 0000000..bd89f7a
--- /dev/null
+++ b/Swift/QtUI/EventViewer/EventView.cpp
@@ -0,0 +1,8 @@
+#include "Swift/QtUI/EventViewer/EventView.h"
+
+namespace Swift {
+EventView::EventView(QWidget* parent) : QWidget(parent) {
+
+}
+
+}
diff --git a/Swift/QtUI/EventViewer/EventView.h b/Swift/QtUI/EventViewer/EventView.h
new file mode 100644
index 0000000..c677e99
--- /dev/null
+++ b/Swift/QtUI/EventViewer/EventView.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#include <QWidget>
+
+namespace Swift {
+ class EventView : public QWidget {
+ Q_OBJECT
+ public:
+ EventView(QWidget* parent);
+ };
+}
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index b02a86e..e3c6e35 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -15,6 +15,7 @@
#include <QMenuBar>
#include <QToolBar>
#include <QAction>
+#include <QTabWidget>
namespace Swift {
@@ -25,19 +26,35 @@ QtMainWindow::QtMainWindow(QtTreeWidgetFactory *treeWidgetFactory) : QWidget() {
mainLayout->setSpacing(0);
meView_ = new QtRosterHeader(this);
mainLayout->addWidget(meView_);
- //statusWidget_ = new QtStatusWidget(this);
connect(meView_, SIGNAL(onChangeStatusRequest(StatusShow::Type, const QString&)), this, SLOT(handleStatusChanged(StatusShow::Type, const QString&)));
- //mainLayout->addWidget(statusWidget_);
+
+ tabs_ = new QTabWidget(this);
+ tabs_->setDocumentMode(true);
+ tabs_->setTabPosition(QTabWidget::South);
+ mainLayout->addWidget(tabs_);
+ contactsTabWidget_ = new QWidget(this);
+ contactsTabWidget_->setContentsMargins(0, 0, 0, 0);
+ QBoxLayout *contactTabLayout = new QBoxLayout(QBoxLayout::TopToBottom, contactsTabWidget_);
+ contactsTabWidget_->setLayout(contactTabLayout);
+ contactTabLayout->setSpacing(0);
+ contactTabLayout->setContentsMargins(0, 0, 0, 0);
+
treeWidget_ = dynamic_cast<QtTreeWidget*>(treeWidgetFactory->createTreeWidget());
- mainLayout->addWidget(treeWidget_);
+ contactTabLayout->addWidget(treeWidget_);
bottomBar_ = new QToolBar(this);
- mainLayout->addWidget(bottomBar_);
+ contactTabLayout->addWidget(bottomBar_);
addAction_ = new QAction("Add Contact", this);
bottomBar_->addAction(addAction_);
connect(addAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddActionTriggered(bool)));
+ tabs_->addTab(contactsTabWidget_, "Contacts");
+
+ eventView_ = new EventView(this);
+
+ tabs_->addTab(eventView_, "Events");
+
this->setLayout(mainLayout);
QMenu* viewMenu = new QMenu(tr("View"), this);
diff --git a/Swift/QtUI/QtMainWindow.h b/Swift/QtUI/QtMainWindow.h
index a62c0a5..1faf65a 100644
--- a/Swift/QtUI/QtMainWindow.h
+++ b/Swift/QtUI/QtMainWindow.h
@@ -5,6 +5,7 @@
#include <QMenu>
#include "Swift/Controllers/MainWindow.h"
#include "Swift/QtUI/QtRosterHeader.h"
+#include "Swift/QtUI/EventViewer/EventView.h"
#include <vector>
@@ -14,12 +15,13 @@ class QPushButton;
class QToolBar;
class QAction;
+class QTabWidget;
+
namespace Swift {
class QtTreeWidget;
class QtTreeWidgetFactory;
class TreeWidget;
-
class QtMainWindow : public QWidget, public MainWindow {
Q_OBJECT
public:
@@ -38,7 +40,6 @@ namespace Swift {
void handleAddActionTriggered(bool checked);
private:
std::vector<QMenu*> menus_;
- //QtStatusWidget* statusWidget_;
QLineEdit* muc_;
QLineEdit* mucNick_;
QPushButton* mucButton_;
@@ -46,6 +47,10 @@ namespace Swift {
QtRosterHeader* meView_;
QToolBar* bottomBar_;
QAction* addAction_;
+ QTabWidget* tabs_;
+ QWidget* contactsTabWidget_;
+ QWidget* eventsTabWidget_;
+ EventView* eventView_;
};
}
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 191b39e..7a955bf 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -68,6 +68,9 @@ sources = [
"Roster/QtTreeWidget.cpp",
"Roster/QtTreeWidgetItem.cpp",
"Roster/RosterDelegate.cpp",
+ "EventViewer/EventView.cpp",
+ "EventViewer/EventModel.cpp",
+ "EventViewer/EventDelegate.cpp",
"QtRosterHeader.cpp",
"qrc_DefaultTheme.cc",
"qrc_Swift.cc",