/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * QtMainWindow.cpp * * Created on: Jan 14, 2010 * Author: crueger */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "QtMainWindow.hpp" #include #include #include #include #include #include #include #include #include "Helpers/MemDebug.hpp" #include "atom.hpp" #include "molecule.hpp" #include "Helpers/Verbose.hpp" #include "Actions/Action.hpp" #include "Actions/ActionRegistry.hpp" #include "Actions/ValueStorage.hpp" #include "Menu/Qt4/QtMenu.hpp" #include "Views/Qt4/QtWorldView.hpp" #include "Views/Qt4/GLMoleculeView.hpp" #include "Views/Qt4/QtMoleculeView.hpp" #include "Views/Qt4/QtStatusBar.hpp" QtMainWindow::QtMainWindow(QApplication *_theApp) : theApp(_theApp) { QSplitter *splitter1 = new QSplitter (Qt::Horizontal, this ); QSplitter *splitter2 = new QSplitter (Qt::Vertical, splitter1 ); worldDisplay = new QtWorldView(splitter2); moleculeDisplay = new QtMoleculeView(); molecule3dDisplay = new GLMoleculeView(); MainMenu = new QtMenu(menuBar(), ""); MainMenu->init(); setCentralWidget(splitter1); splitter1->addWidget(splitter2); splitter1->addWidget(moleculeDisplay); splitter2->addWidget(molecule3dDisplay); splitter2->addWidget(worldDisplay); statusBar = new QtStatusBar(this); setStatusBar(statusBar); connect(worldDisplay,SIGNAL(moleculeSelected(molecule*)),moleculeDisplay,SLOT(moleculeSelected(molecule*))); connect(worldDisplay,SIGNAL(moleculeUnSelected(molecule*)),moleculeDisplay,SLOT(moleculeUnSelected(molecule*))); } QtMainWindow::~QtMainWindow() { menuBar()->clear(); } void QtMainWindow::display() { this->show(); theApp->exec(); }