28 #include "../../../layout/qt/core/Scene.h"
29 #include "../../../color/RGBAColor.h"
30 #include "../../../geometry/Envelope.h"
34 #include "../../../layout/core/pattern/singleton/Context.h"
37 #include <QGraphicsScene>
38 #include <QApplication>
39 #include <QDesktopWidget>
40 #include <QMainWindow>
42 #include <QVBoxLayout>
46 m_dockLayoutDisplay(0),
76 delete m_buildContext;
88 delete m_proxyProject;
98 QRect screen = QApplication::desktop()->screen()->rect();
102 QMainWindow* mw =
dynamic_cast<QMainWindow*
>(mainWindow);
105 size = mw->centralWidget()->size();
106 screen = mw->centralWidget()->geometry();
118 m_view->move( screen.center() - m_view->rect().center() );
121 createLayoutContext(size.width(), size.height());
129 createDockLayoutDisplay(mainWindow, m_view);
133 m_outsideArea =
new OutsideArea(m_view, mainWindow, mnuLayout, m_statusBar);
134 m_outsideArea->connect(m_outsideArea, SIGNAL(exit()), m_dockLayoutDisplay, SLOT(onExit()));
138 m_outsideArea->openMainMenu();
139 m_outsideArea->openAllDocks();
146 QMainWindow* mw =
dynamic_cast<QMainWindow*
>(mainWindow);
147 if(!m_dockLayoutDisplay)
151 m_statusBar =
new QStatusBar;
152 m_statusBar->setMinimumSize(200, 10);
153 m_statusBar->showMessage(
"Map Layout - TerraLib 5");
155 QVBoxLayout* vLayout =
new QVBoxLayout;
156 vLayout->addWidget(view);
157 vLayout->addWidget(m_statusBar);
159 m_groupBox =
new QGroupBox(m_dockLayoutDisplay);
160 m_groupBox->setLayout(vLayout);
163 m_dockLayoutDisplay->setWidget(m_groupBox);
164 m_dockLayoutDisplay->setPreviousCentralWidget(mw->centralWidget());
165 m_dockLayoutDisplay->setParent(mw);
167 mw->setCentralWidget(m_dockLayoutDisplay);
168 m_dockLayoutDisplay->setVisible(
true);
177 m_buildContext->createLayoutContext(width, height, m_view);
187 if(m_dockLayoutDisplay)
189 m_dockLayoutDisplay->close();
190 delete m_dockLayoutDisplay;
191 m_dockLayoutDisplay = 0;
200 m_buildEnums->build();
te::layout::BuildEnums * m_buildEnums
Provide a surrogate or placeholder for te::qt::af::Project to control access to it. A wrapper to access without complexity. This proxy is required because module not must have dependence te::qt::af. Useful to access the Layers belonging to the project.
Provide a surrogate or placeholder for te::qt::af::Project to control access to it. A wrapper to access without complexity. This proxy is required because module not must have dependence te::qt::af. Useful to access the Layers belonging to the project.
te::layout::BuildContext * m_buildContext
void createDockLayoutDisplay(QWidget *mainWindow, te::layout::View *view)
void createLayoutContext(int width, int height)
static Context & getInstance()
It returns a reference to the singleton instance.
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
Class representing the scene. This scene is child of QGraphicsScene, part of Graphics View Framework...
virtual void init(QWidget *mainWindow=0, QMenu *mnuLayout=0)
Inializes.