Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //! @author Adam Emil Skoog
- //! @date 2010-07-13
- #include "MainWindow.h"
- namespace smith
- {
- /**
- * Constructor. Creates the window and its components.
- */
- MainWindow::MainWindow()
- :
- content (new QWidget),
- layout (new QGridLayout),
- viewport (new Viewport(1024,768,this)),
- groupTiles (new QGroupBox(tr("Tiles"))),
- layoutTiles (new QVBoxLayout),
- dropdownTiles(new QComboBox)
- {
- // Show the viewport.
- viewport->show();
- // Add the viewport to the grid.
- layout->addWidget(viewport,0,0);
- // Tile section.
- groupTiles->setLayout(layoutTiles);
- layout->addWidget(groupTiles,0,1);
- dropdownTiles->insertItem(0,"Test 1");
- dropdownTiles->insertItem(1,"Test 2");
- dropdownTiles->insertItem(2,"Test 3");
- layoutTiles->addWidget(dropdownTiles,Qt::AlignTop);
- layoutTiles->addStretch();
- // Add the grid to the content.
- content->setLayout(layout);
- // Add the content to the window.
- setCentralWidget(content);
- // Set the caption.
- setWindowTitle("Regin");
- setWindowState(windowState() | Qt::WindowMaximized);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement