Began refactoring the entire source tree.
[aesalon.git] / src / visualizer / RootWindow.cpp
blob25ca10c04704db7ed5bddbe94f46f0521238a7da
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_mdiArea = new QMdiArea(this);
50 setCentralWidget(m_mdiArea);
53 void RootWindow::newRootWindow() {
54 RootWindow *rw = new RootWindow();
55 rw->show();
58 } // namespace Visualizer