##// END OF EJS Templates
Fix layouting in mapviewer
Michal Klocek -
r1964:f20e471e2754
parent child
Show More
@@ -65,8 +65,6 Window::Window(QWidget* parent) :
65 65 m_template(0)
66 66 {
67 67 createProxyWidgets();
68 connectSignals();
69
70 68 // create layout
71 69 QGraphicsLinearLayout *settingsLayout = new QGraphicsLinearLayout();
72 70 settingsLayout->setOrientation(Qt::Vertical);
@@ -109,12 +107,14 Window::Window(QWidget* parent) :
109 107 m_rubberBand->setVisible(false);
110 108
111 109 m_view = new View(m_scene, m_form);
112 m_view->setMinimumSize(m_form->preferredSize().toSize());
110 m_view->setMinimumSize(m_form->minimumSize().toSize());
113 111
114 112 // Set defaults
115 113 m_antialiasCheckBox->setChecked(true);
116 114 updateUI();
117 115 setCentralWidget(m_view);
116
117 connectSignals();
118 118 }
119 119
120 120 Window::~Window()
@@ -123,6 +123,7 Window::~Window()
123 123
124 124 void Window::connectSignals()
125 125 {
126 QObject::connect(m_form, SIGNAL(geometryChanged()),this ,SLOT(handleGeometryChanged()));
126 127 QObject::connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUI()));
127 128 QObject::connect(m_antialiasCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI()));
128 129 QObject::connect(m_openGLCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI()));
@@ -581,3 +582,8 QAction* Window::createMenuAction(QMenu *menu, const QIcon &icon, const QString
581 582 action->setData(data);
582 583 return action;
583 584 }
585
586 void Window::handleGeometryChanged()
587 {
588 m_view->scene()->setSceneRect(0, 0, this->width(), this->height());
589 }
@@ -51,6 +51,7 public:
51 51
52 52 private Q_SLOTS:
53 53 void updateUI();
54 void handleGeometryChanged();
54 55 private:
55 56 QComboBox* createThemeBox();
56 57 QComboBox* createAnimationBox();
General Comments 0
You need to be logged in to leave comments. Login now