@@ -65,8 +65,6 Window::Window(QWidget* parent) : | |||||
65 | m_template(0) |
|
65 | m_template(0) | |
66 | { |
|
66 | { | |
67 | createProxyWidgets(); |
|
67 | createProxyWidgets(); | |
68 | connectSignals(); |
|
|||
69 |
|
||||
70 | // create layout |
|
68 | // create layout | |
71 | QGraphicsLinearLayout *settingsLayout = new QGraphicsLinearLayout(); |
|
69 | QGraphicsLinearLayout *settingsLayout = new QGraphicsLinearLayout(); | |
72 | settingsLayout->setOrientation(Qt::Vertical); |
|
70 | settingsLayout->setOrientation(Qt::Vertical); | |
@@ -109,12 +107,14 Window::Window(QWidget* parent) : | |||||
109 | m_rubberBand->setVisible(false); |
|
107 | m_rubberBand->setVisible(false); | |
110 |
|
108 | |||
111 | m_view = new View(m_scene, m_form); |
|
109 | m_view = new View(m_scene, m_form); | |
112 |
m_view->setMinimumSize(m_form-> |
|
110 | m_view->setMinimumSize(m_form->minimumSize().toSize()); | |
113 |
|
111 | |||
114 | // Set defaults |
|
112 | // Set defaults | |
115 | m_antialiasCheckBox->setChecked(true); |
|
113 | m_antialiasCheckBox->setChecked(true); | |
116 | updateUI(); |
|
114 | updateUI(); | |
117 | setCentralWidget(m_view); |
|
115 | setCentralWidget(m_view); | |
|
116 | ||||
|
117 | connectSignals(); | |||
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | Window::~Window() |
|
120 | Window::~Window() | |
@@ -123,6 +123,7 Window::~Window() | |||||
123 |
|
123 | |||
124 | void Window::connectSignals() |
|
124 | void Window::connectSignals() | |
125 | { |
|
125 | { | |
|
126 | QObject::connect(m_form, SIGNAL(geometryChanged()),this ,SLOT(handleGeometryChanged())); | |||
126 | QObject::connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUI())); |
|
127 | QObject::connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUI())); | |
127 | QObject::connect(m_antialiasCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI())); |
|
128 | QObject::connect(m_antialiasCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI())); | |
128 | QObject::connect(m_openGLCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI())); |
|
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 | action->setData(data); |
|
582 | action->setData(data); | |
582 | return action; |
|
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 | private Q_SLOTS: |
|
52 | private Q_SLOTS: | |
53 | void updateUI(); |
|
53 | void updateUI(); | |
|
54 | void handleGeometryChanged(); | |||
54 | private: |
|
55 | private: | |
55 | QComboBox* createThemeBox(); |
|
56 | QComboBox* createThemeBox(); | |
56 | QComboBox* createAnimationBox(); |
|
57 | QComboBox* createAnimationBox(); |
General Comments 0
You need to be logged in to leave comments.
Login now