The Visualizer's GUI design is being threshed out nicely now.
[aesalon.git] / visualizer / src / RootWindow.cpp
blob7bbfbeb076edabb842c9c63534a3d5d2886a2e4a
1 /**
2 Aesalon, a tool to visualize a program's behaviour at run-time.
3 Copyright (C) 2010, Aesalon Development Team.
5 Aesalon is distributed under the terms of the GNU GPLv3. For more
6 licensing information, see the file LICENSE included with the distribution.
8 @file visualizer/src//RootWindow.cpp
12 #include "RootWindow.h"
13 #include <QMenuBar>
14 #include <QStyle>
15 #include <QLabel>
17 namespace Visualizer {
19 RootWindow::RootWindow() {
20 initialSetup();
23 RootWindow::~RootWindow() {
27 void RootWindow::initialSetup() {
28 /* Basic geometry . . . */
29 setMinimumWidth(600);
30 setMinimumHeight(400);
32 /* Icon . . . */
33 setWindowIcon(QIcon(":/icon.png"));
35 /* Menus . . . */
36 QMenu *menu = NULL;
37 QAction *action = NULL;
39 menu = menuBar()->addMenu(tr("&Aesalon"));
40 action = menu->addAction(
41 style()->standardIcon(QStyle::SP_FileDialogNewFolder),
42 tr("&New"));
43 connect(action, SIGNAL(triggered(bool)), SLOT(newRootWindow()));
44 action = menu->addAction(
45 style()->standardIcon(QStyle::SP_DialogCloseButton),
46 tr("&Close"));
47 connect(action, SIGNAL(triggered(bool)), SLOT(close()));
49 m_splitter = new QSplitter();
51 m_splitter->setOrientation(Qt::Horizontal);
53 setCentralWidget(m_splitter);
56 void RootWindow::newRootWindow() {
57 RootWindow *rw = new RootWindow();
58 rw->show();
61 } // namespace Visualizer