summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-11-25 14:07:29 (GMT)
committerKevin Smith <git@kismith.co.uk>2014-12-14 14:44:00 (GMT)
commitb4a54583c4d575fe152122c21da616c3c942bbfd (patch)
tree7e558fd9cb75291f4d5eec90da9d8dd5650ceea2 /Swift/QtUI/QtChatTabs.h
parent92672e17a52d0c86e693183627c8c6b8fa44fb86 (diff)
downloadswift-b4a54583c4d575fe152122c21da616c3c942bbfd.zip
swift-b4a54583c4d575fe152122c21da616c3c942bbfd.tar.bz2
Add support for new trellis layout for chat windows.
This includes dynamic customizable grid layouting of chat tabs including: - arrengement of tabs via menu, keyboard shortcuts or drag'n'drop - change of grid size via mouse or keyboard - save/restore of grid size and positions of chats inside the grid Test-Information: Tested on OS X 10.9.8. Change-Id: I43f94293a1c672971640c3000abfc6530f2ea7a8
Diffstat (limited to 'Swift/QtUI/QtChatTabs.h')
-rw-r--r--Swift/QtUI/QtChatTabs.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatTabs.h b/Swift/QtUI/QtChatTabs.h
index f9cd685..99ab74a 100644
--- a/Swift/QtUI/QtChatTabs.h
+++ b/Swift/QtUI/QtChatTabs.h
@@ -1,26 +1,36 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2014 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
-#include "QtTabbable.h"
-#include "QtTabWidget.h"
#include <QWidget>
#include <QRect>
class QTabWidget;
+class QMenu;
namespace Swift {
+ class SettingsProvider;
+
+ class QtTabbable;
+ class QtTabWidget;
+ class QtDynamicGridLayout;
+ class QtGridSelectionDialog;
+
class QtChatTabs : public QWidget {
Q_OBJECT
public:
- QtChatTabs(bool singleWindow);
+ QtChatTabs(bool singleWindow, SettingsProvider* settingsProvider, bool trellisMode);
+ virtual ~QtChatTabs();
+
void addTab(QtTabbable* tab);
void minimise();
QtTabbable* getCurrentTab();
+ void setViewMenu(QMenu* viewMenu);
+
signals:
void geometryChanged();
void onTitleChanged(const QString& title);
@@ -42,10 +52,18 @@ namespace Swift {
void handleRequestedActiveTab();
void flash();
+ void handleOpenLayoutChangeDialog();
+
private:
+ void storeTabPositions();
void checkForFirstShow();
- QtTabWidget* tabs_;
+
+ private:
bool singleWindow_;
+ SettingsProvider* settingsProvider_;
+ bool trellisMode_;
+ QtDynamicGridLayout* dynamicGrid_;
+ QtGridSelectionDialog* gridSelectionDialog_;
};
}