Skip to content
Snippets Groups Projects
Commit 81a825b1 authored by Peter Albrecht's avatar Peter Albrecht
Browse files

Added automatic static resize

parent 4b6f917f
No related branches found
No related tags found
1 merge request!406Refactor skill memory GUI
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string>SkillManagerMonitorWidget</string> <string>SkillManagerMonitorWidget</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0,0,0"> <layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0,0,0,0">
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">
<widget class="QSplitter" name="splitter_2"> <widget class="QSplitter" name="splitter_2">
<property name="enabled"> <property name="enabled">
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="4" column="0" colspan="2"> <item row="5" column="0" colspan="2">
<widget class="QLabel" name="connectionStatusLabel"> <widget class="QLabel" name="connectionStatusLabel">
<property name="text"> <property name="text">
<string>(hidden in GUI)</string> <string>(hidden in GUI)</string>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include <QApplication> #include <QApplication>
#include <QClipboard> #include <QClipboard>
#include <QHeaderView>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <RobotAPI/libraries/aron/converter/json/NLohmannJSONConverter.h> #include <RobotAPI/libraries/aron/converter/json/NLohmannJSONConverter.h>
...@@ -99,6 +100,14 @@ namespace armarx::skills::gui ...@@ -99,6 +100,14 @@ namespace armarx::skills::gui
this->updateContents(sid, descr); this->updateContents(sid, descr);
} }
// dummy reimplementation, adds column resize
void
SkillDetailsTreeWidget::resizeEvent(QResizeEvent* event)
{
QTreeWidget::resizeEvent(event);
this->resizeContents();
}
void void
SkillDetailsTreeWidget::setupUi() SkillDetailsTreeWidget::setupUi()
{ {
...@@ -131,7 +140,9 @@ namespace armarx::skills::gui ...@@ -131,7 +140,9 @@ namespace armarx::skills::gui
const int dynamicColumnSize = widthRemainder / 2; const int dynamicColumnSize = widthRemainder / 2;
// set width... // set width...
this->setColumnWidth(0, dynamicColumnSize); this->setColumnWidth(0, dynamicColumnSize);
this->setColumnWidth(1, dynamicColumnSize); this->setColumnWidth(1, dynamicColumnSize);
} }
...@@ -163,7 +174,6 @@ namespace armarx::skills::gui ...@@ -163,7 +174,6 @@ namespace armarx::skills::gui
void void
SkillDetailsTreeWidget::pasteCurrentConfig() SkillDetailsTreeWidget::pasteCurrentConfig()
{ {
QClipboard* clipboard = QApplication::clipboard(); QClipboard* clipboard = QApplication::clipboard();
std::string s = clipboard->text().toStdString(); std::string s = clipboard->text().toStdString();
nlohmann::json json = nlohmann::json::parse(s); nlohmann::json json = nlohmann::json::parse(s);
......
...@@ -30,6 +30,9 @@ namespace armarx::skills::gui ...@@ -30,6 +30,9 @@ namespace armarx::skills::gui
void disconnectGui(); void disconnectGui();
void updateGui(); void updateGui();
private slots:
void resizeEvent(QResizeEvent* event) override;
private: private:
struct ShownSkill struct ShownSkill
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment