blob: ce3272a1aafb57a6961a07b265f99770f310bd41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#ifndef SWIFT_QtMainWindow_H
#define SWIFT_QtMainWindow_H
#include <QWidget>
#include <QMenu>
#include "Swift/Controllers/MainWindow.h"
#include "Swift/QtUI/QtRosterHeader.h"
#include "Swift/QtUI/EventViewer/QtEventWindow.h"
#include <vector>
class QComboBox;
class QLineEdit;
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:
QtMainWindow(QtTreeWidgetFactory *treeWidgetFactory);
TreeWidget* getTreeWidget();
std::vector<QMenu*> getMenus() {return menus_;}
void setMyName(const String& name);
void setMyAvatarPath(const String& path);
void setMyStatusText(const String& status);
void setMyStatusType(const StatusShow::Type type);
QtEventWindow* getEventWindow();
private slots:
void handleStatusChanged(StatusShow::Type showType, const QString &statusMessage);
void handleShowOfflineToggled(bool);
void handleJoinMUCAction();
void handleSignOutAction();
void handleJoinMUCDialogComplete(const JID& muc, const QString& nick);
void handleAddContactDialogComplete(const JID& contact, const QString& name);
void handleAddActionTriggered(bool checked);
private:
std::vector<QMenu*> menus_;
QLineEdit* muc_;
QLineEdit* mucNick_;
QPushButton* mucButton_;
QtTreeWidget* treeWidget_;
QtRosterHeader* meView_;
QAction* addAction_;
QTabWidget* tabs_;
QWidget* contactsTabWidget_;
QWidget* eventsTabWidget_;
QtEventWindow* eventWindow_;
};
}
#endif
|