1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 05:11:49 -05:00

Commands and presets GUI: changed view details

This commit is contained in:
f4exb 2018-01-06 02:44:45 +01:00
parent 5c6984899e
commit 13a0f445d0
2 changed files with 180 additions and 189 deletions

View File

@ -534,8 +534,6 @@ void MainWindow::loadSettings()
treeItem = addCommandToTree(m_settings.getCommand(i)); treeItem = addCommandToTree(m_settings.getCommand(i));
} }
tabifyDockWidget(ui->presetDock, ui->commandsDock);
setLoggingOptions(); setLoggingOptions();
} }
@ -565,6 +563,8 @@ void MainWindow::loadPresetSettings(const Preset* preset, int tabIndex)
// has to be last step // has to be last step
restoreState(preset->getLayout()); restoreState(preset->getLayout());
tabifyDockWidget(ui->presetDock, ui->commandsDock); // override this setting
ui->presetDock->raise();
} }
void MainWindow::savePresetSettings(Preset* preset, int tabIndex) void MainWindow::savePresetSettings(Preset* preset, int tabIndex)
@ -1076,7 +1076,7 @@ void MainWindow::on_presetSave_clicked()
void MainWindow::on_presetUpdate_clicked() void MainWindow::on_presetUpdate_clicked()
{ {
QTreeWidgetItem* item = ui->presetTree->currentItem(); QTreeWidgetItem* item = ui->presetTree->currentItem();
const Preset* changedPreset; const Preset* changedPreset = 0;
if(item != 0) if(item != 0)
{ {

View File

@ -301,8 +301,11 @@
<attribute name="dockWidgetArea"> <attribute name="dockWidgetArea">
<number>1</number> <number>1</number>
</attribute> </attribute>
<widget class="QWidget" name="dockWidgetContents"> <widget class="QWidget" name="presetsDockWidget">
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin"> <property name="leftMargin">
<number>2</number> <number>2</number>
</property> </property>
@ -315,104 +318,7 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<property name="spacing"> <item>
<number>3</number>
</property>
<item row="5" column="2">
<widget class="QToolButton" name="presetUpdate">
<property name="toolTip">
<string>Update selected preset with current settings</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/recycle.png</normaloff>:/recycle.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QToolButton" name="presetEdit">
<property name="toolTip">
<string>Edit preset details</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/edit.png</normaloff>:/edit.png</iconset>
</property>
</widget>
</item>
<item row="5" column="5">
<widget class="QToolButton" name="presetExport">
<property name="toolTip">
<string>Export current preset to file</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/export.png</normaloff>:/export.png</iconset>
</property>
</widget>
</item>
<item row="5" column="7">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="9">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="3">
<widget class="QToolButton" name="settingsSave">
<property name="toolTip">
<string>Save the current settings (inc. presets)</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/save.png</normaloff>:/save.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2" colspan="13">
<widget class="QTreeWidget" name="presetTree"> <widget class="QTreeWidget" name="presetTree">
<property name="indentation"> <property name="indentation">
<number>10</number> <number>10</number>
@ -446,21 +352,9 @@
</column> </column>
</widget> </widget>
</item> </item>
<item row="5" column="6"> <item>
<widget class="QToolButton" name="presetImport"> <layout class="QHBoxLayout" name="presetsControl">
<property name="toolTip"> <item>
<string>Import preset from file into current group</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/import.png</normaloff>:/import.png</iconset>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QToolButton" name="presetSave"> <widget class="QToolButton" name="presetSave">
<property name="toolTip"> <property name="toolTip">
<string>Save current settings as new preset</string> <string>Save current settings as new preset</string>
@ -480,7 +374,135 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="10"> <item>
<widget class="QToolButton" name="presetUpdate">
<property name="toolTip">
<string>Update selected preset with current settings</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/recycle.png</normaloff>:/recycle.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="settingsSave">
<property name="toolTip">
<string>Save the current settings (inc. presets)</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/save.png</normaloff>:/save.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="presetEdit">
<property name="toolTip">
<string>Edit preset details</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/edit.png</normaloff>:/edit.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="presetExport">
<property name="toolTip">
<string>Export current preset to file</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/export.png</normaloff>:/export.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="presetImport">
<property name="toolTip">
<string>Import preset from file into current group</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/import.png</normaloff>:/import.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="presetDelete">
<property name="toolTip">
<string>Delete selected preset</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/bin.png</normaloff>:/bin.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="presetLoad"> <widget class="QToolButton" name="presetLoad">
<property name="toolTip"> <property name="toolTip">
<string>Load selected preset</string> <string>Load selected preset</string>
@ -500,25 +522,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="8"> </layout>
<widget class="QToolButton" name="presetDelete">
<property name="toolTip">
<string>Delete selected preset</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources/res.qrc">
<normaloff>:/bin.png</normaloff>:/bin.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -617,18 +621,6 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="commandsControl"> <layout class="QHBoxLayout" name="commandsControl">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item> <item>
<widget class="QToolButton" name="commandNew"> <widget class="QToolButton" name="commandNew">
<property name="toolTip"> <property name="toolTip">
@ -924,7 +916,6 @@
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>presetTree</tabstop> <tabstop>presetTree</tabstop>
<tabstop>presetSave</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="resources/res.qrc"/> <include location="resources/res.qrc"/>