Commit 50a34cae authored by lm's avatar lm

Adjusted to small screens

parent 297d2ac5
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="10,20">
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
</property> </property>
...@@ -51,8 +51,14 @@ ...@@ -51,8 +51,14 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>250</width> <width>90</width>
<height>300</height> <height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>370</width>
<height>16777215</height>
</size> </size>
</property> </property>
<property name="title"> <property name="title">
...@@ -71,21 +77,21 @@ ...@@ -71,21 +77,21 @@
<item> <item>
<widget class="QScrollArea" name="curveListWidget"> <widget class="QScrollArea" name="curveListWidget">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>240</width> <width>60</width>
<height>250</height> <height>150</height>
</size> </size>
</property> </property>
<property name="baseSize"> <property name="baseSize">
<size> <size>
<width>150</width> <width>60</width>
<height>200</height> <height>150</height>
</size> </size>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
...@@ -108,7 +114,7 @@ ...@@ -108,7 +114,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>242</width> <width>210</width>
<height>361</height> <height>361</height>
</rect> </rect>
</property> </property>
...@@ -122,14 +128,14 @@ ...@@ -122,14 +128,14 @@
<widget class="QGroupBox" name="diagramGroupBox"> <widget class="QGroupBox" name="diagramGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>9</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>200</width>
<height>300</height> <height>200</height>
</size> </size>
</property> </property>
<property name="baseSize"> <property name="baseSize">
......
...@@ -216,6 +216,19 @@ MainWindow::~MainWindow() ...@@ -216,6 +216,19 @@ MainWindow::~MainWindow()
} }
void MainWindow::resizeEvent(QResizeEvent * event)
{
Q_UNUSED(event);
if (height() < 800)
{
ui.statusBar->setVisible(false);
}
else
{
ui.statusBar->setVisible(true);
}
}
QString MainWindow::getWindowStateKey() QString MainWindow::getWindowStateKey()
{ {
return QString::number(currentView)+"/windowstate"; return QString::number(currentView)+"/windowstate";
......
...@@ -297,6 +297,8 @@ protected: ...@@ -297,6 +297,8 @@ protected:
*/ */
void showTheCentralWidget (TOOLS_WIDGET_NAMES centralWidget, VIEW_SECTIONS view); void showTheCentralWidget (TOOLS_WIDGET_NAMES centralWidget, VIEW_SECTIONS view);
/** @brief Catch window resize events */
void resizeEvent(QResizeEvent * event);
/** @brief Keeps track of the current view */ /** @brief Keeps track of the current view */
VIEW_SECTIONS currentView; VIEW_SECTIONS currentView;
......
...@@ -199,7 +199,7 @@ void LinechartWidget::createLayout() ...@@ -199,7 +199,7 @@ void LinechartWidget::createLayout()
layout->addWidget(activePlot, 0, 0, 1, 6); layout->addWidget(activePlot, 0, 0, 1, 6);
layout->setRowStretch(0, 10); layout->setRowStretch(0, 10);
layout->setRowStretch(1, 0); layout->setRowStretch(1, 1);
// Linear scaling button // Linear scaling button
scalingLinearButton = createButton(this); scalingLinearButton = createButton(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment