Move timeline to Radar Toolbox

This commit is contained in:
Dan Paulat 2023-06-28 22:07:19 -05:00
parent 6a92e7601e
commit 35ac8bb55b
4 changed files with 295 additions and 344 deletions

View file

@ -66,6 +66,7 @@ public:
level2ProductsGroup_ {nullptr}, level2ProductsGroup_ {nullptr},
level2SettingsGroup_ {nullptr}, level2SettingsGroup_ {nullptr},
level3ProductsGroup_ {nullptr}, level3ProductsGroup_ {nullptr},
timelineGroup_ {nullptr},
level2ProductsWidget_ {nullptr}, level2ProductsWidget_ {nullptr},
level2SettingsWidget_ {nullptr}, level2SettingsWidget_ {nullptr},
level3ProductsWidget_ {nullptr}, level3ProductsWidget_ {nullptr},
@ -151,6 +152,7 @@ public:
ui::CollapsibleGroup* level2ProductsGroup_; ui::CollapsibleGroup* level2ProductsGroup_;
ui::CollapsibleGroup* level2SettingsGroup_; ui::CollapsibleGroup* level2SettingsGroup_;
ui::CollapsibleGroup* level3ProductsGroup_; ui::CollapsibleGroup* level3ProductsGroup_;
ui::CollapsibleGroup* timelineGroup_;
ui::Level2ProductsWidget* level2ProductsWidget_; ui::Level2ProductsWidget* level2ProductsWidget_;
ui::Level2SettingsWidget* level2SettingsWidget_; ui::Level2SettingsWidget* level2SettingsWidget_;
@ -202,21 +204,13 @@ MainWindow::MainWindow(QWidget* parent) :
p->alertDockWidget_->setVisible(false); p->alertDockWidget_->setVisible(false);
addDockWidget(Qt::BottomDockWidgetArea, p->alertDockWidget_); addDockWidget(Qt::BottomDockWidgetArea, p->alertDockWidget_);
// Animation Dock Widget
p->animationDockWidget_ = new ui::AnimationDockWidget(this);
p->animationDockWidget_->setVisible(true);
addDockWidget(Qt::LeftDockWidgetArea, p->animationDockWidget_);
// Configure Menu // Configure Menu
ui->menuView->insertAction(ui->actionRadarToolbox, ui->menuView->insertAction(ui->actionRadarToolbox,
ui->radarToolboxDock->toggleViewAction()); ui->radarToolboxDock->toggleViewAction());
ui->radarToolboxDock->toggleViewAction()->setText(tr("Radar &Toolbox")); ui->radarToolboxDock->toggleViewAction()->setText(tr("Radar &Toolbox"));
ui->actionRadarToolbox->setVisible(false); ui->actionRadarToolbox->setVisible(false);
ui->menuView->insertAction(ui->actionAnimationToolbox, // Deprecated: Hide Animation Toolbox Selection
p->animationDockWidget_->toggleViewAction());
p->animationDockWidget_->toggleViewAction()->setText(
tr("A&nimation Toolbox"));
ui->actionAnimationToolbox->setVisible(false); ui->actionAnimationToolbox->setVisible(false);
ui->menuView->insertAction(ui->actionResourceExplorer, ui->menuView->insertAction(ui->actionResourceExplorer,
@ -287,6 +281,12 @@ MainWindow::MainWindow(QWidget* parent) :
ui->radarToolboxScrollAreaContents->layout()->addWidget( ui->radarToolboxScrollAreaContents->layout()->addWidget(
p->level2SettingsGroup_); p->level2SettingsGroup_);
// Timeline
p->timelineGroup_ = new ui::CollapsibleGroup(tr("Timeline"), this);
p->animationDockWidget_ = new ui::AnimationDockWidget(this);
p->timelineGroup_->GetContentsLayout()->addWidget(p->animationDockWidget_);
ui->radarToolboxScrollAreaContents->layout()->addWidget(p->timelineGroup_);
// Reset toolbox spacer at the bottom // Reset toolbox spacer at the bottom
ui->radarToolboxScrollAreaContents->layout()->removeItem( ui->radarToolboxScrollAreaContents->layout()->removeItem(
ui->radarToolboxSpacer); ui->radarToolboxSpacer);

View file

@ -51,7 +51,7 @@ public:
}; };
AnimationDockWidget::AnimationDockWidget(QWidget* parent) : AnimationDockWidget::AnimationDockWidget(QWidget* parent) :
QDockWidget(parent), QFrame(parent),
p {std::make_unique<AnimationDockWidgetImpl>(this)}, p {std::make_unique<AnimationDockWidgetImpl>(this)},
ui(new Ui::AnimationDockWidget) ui(new Ui::AnimationDockWidget)
{ {

View file

@ -4,7 +4,7 @@
#include <chrono> #include <chrono>
#include <QDockWidget> #include <QFrame>
namespace Ui namespace Ui
{ {
@ -20,7 +20,7 @@ namespace ui
class AnimationDockWidgetImpl; class AnimationDockWidgetImpl;
class AnimationDockWidget : public QDockWidget class AnimationDockWidget : public QFrame
{ {
Q_OBJECT Q_OBJECT

View file

@ -1,353 +1,304 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>AnimationDockWidget</class> <class>AnimationDockWidget</class>
<widget class="QDockWidget" name="AnimationDockWidget"> <widget class="QFrame" name="AnimationDockWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>200</width> <width>189</width>
<height>543</height> <height>264</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="frameShape">
<string>Animation Toolbox</string> <enum>QFrame::StyledPanel</enum>
</property> </property>
<widget class="QWidget" name="dockWidgetContents"> <property name="frameShadow">
<layout class="QVBoxLayout" name="verticalLayout"> <enum>QFrame::Raised</enum>
<item> </property>
<widget class="QScrollArea" name="scrollArea"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="frameShape"> <property name="leftMargin">
<enum>QFrame::NoFrame</enum> <number>0</number>
</property> </property>
<property name="lineWidth"> <property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="autoUpdateLabel">
<property name="text">
<string>Auto Update: Enabled</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="liveViewRadioButton">
<property name="text">
<string>Live View</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="archiveViewRadioButton">
<property name="text">
<string>Archive View</string>
</property>
</widget>
</item>
<item>
<widget class="QDateEdit" name="dateEdit">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="minimumDateTime">
<datetime>
<hour>0</hour>
<minute>0</minute>
<second>0</second>
<year>1991</year>
<month>6</month>
<day>1</day>
</datetime>
</property>
<property name="displayFormat">
<string>yyyy-MM-dd</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="horizontalScrollBarPolicy"> <property name="topMargin">
<enum>Qt::ScrollBarAlwaysOff</enum> <number>0</number>
</property> </property>
<property name="widgetResizable"> <property name="rightMargin">
<bool>true</bool> <number>0</number>
</property> </property>
<widget class="QWidget" name="scrollAreaContents"> <property name="bottomMargin">
<property name="geometry"> <number>0</number>
<rect> </property>
<x>0</x> <item>
<y>0</y> <widget class="QTimeEdit" name="timeEdit">
<width>182</width> <property name="correctionMode">
<height>506</height> <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property> </property>
<property name="topMargin"> <property name="displayFormat">
<number>0</number> <string>HH:mm</string>
</property> </property>
<property name="rightMargin"> </widget>
<number>0</number> </item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>UTC</string>
</property> </property>
<property name="bottomMargin"> </widget>
<number>0</number> </item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_3">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="QSpinBox" name="loopTimeSpinBox">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property> </property>
<item> <property name="suffix">
<widget class="QGroupBox" name="timelineGroupBox"> <string> min</string>
<property name="title"> </property>
<string>Timeline</string> <property name="minimum">
</property> <number>1</number>
<layout class="QVBoxLayout" name="verticalLayout_6"> </property>
<item> <property name="maximum">
<widget class="QLabel" name="autoUpdateLabel"> <number>1440</number>
<property name="text"> </property>
<string>Auto Update: Enabled</string> <property name="value">
</property> <number>30</number>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QRadioButton" name="liveViewRadioButton"> <item row="1" column="0">
<property name="text"> <widget class="QLabel" name="loopSpeedLabel">
<string>Live View</string> <property name="text">
</property> <string>Loop Speed</string>
<property name="checked"> </property>
<bool>true</bool> </widget>
</property> </item>
</widget> <item row="2" column="0">
</item> <widget class="QLabel" name="loopDelayLabel">
<item> <property name="text">
<widget class="QRadioButton" name="archiveViewRadioButton"> <string>Loop Delay</string>
<property name="text"> </property>
<string>Archive View</string> </widget>
</property> </item>
</widget> <item row="2" column="1">
</item> <widget class="QDoubleSpinBox" name="loopDelaySpinBox">
<item> <property name="suffix">
<widget class="QDateEdit" name="dateEdit"> <string> sec</string>
<property name="correctionMode"> </property>
<enum>QAbstractSpinBox::CorrectToNearestValue</enum> <property name="decimals">
</property> <number>1</number>
<property name="minimumDateTime"> </property>
<datetime> <property name="maximum">
<hour>0</hour> <double>15.000000000000000</double>
<minute>0</minute> </property>
<second>0</second> <property name="singleStep">
<year>1991</year> <double>0.100000000000000</double>
<month>6</month> </property>
<day>1</day> <property name="value">
</datetime> <double>2.500000000000000</double>
</property> </property>
<property name="displayFormat"> </widget>
<string>yyyy-MM-dd</string> </item>
</property> <item row="1" column="1">
<property name="calendarPopup"> <widget class="QDoubleSpinBox" name="loopSpeedSpinBox">
<bool>true</bool> <property name="correctionMode">
</property> <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</widget> </property>
</item> <property name="suffix">
<item> <string>x</string>
<widget class="QFrame" name="frame"> </property>
<property name="frameShape"> <property name="minimum">
<enum>QFrame::StyledPanel</enum> <double>1.000000000000000</double>
</property> </property>
<property name="frameShadow"> <property name="value">
<enum>QFrame::Raised</enum> <double>1.000000000000000</double>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> </widget>
<property name="leftMargin"> </item>
<number>0</number> <item row="0" column="0">
</property> <widget class="QLabel" name="loopTimeLabel">
<property name="topMargin"> <property name="text">
<number>0</number> <string>Loop Time</string>
</property> </property>
<property name="rightMargin"> </widget>
<number>0</number> </item>
</property> </layout>
<property name="bottomMargin"> </widget>
<number>0</number> </item>
</property> <item>
<item> <widget class="QFrame" name="frame_2">
<widget class="QTimeEdit" name="timeEdit"> <property name="frameShape">
<property name="correctionMode"> <enum>QFrame::StyledPanel</enum>
<enum>QAbstractSpinBox::CorrectToNearestValue</enum> </property>
</property> <property name="frameShadow">
<property name="displayFormat"> <enum>QFrame::Raised</enum>
<string>HH:mm</string> </property>
</property> <layout class="QHBoxLayout" name="horizontalLayout_2">
</widget> <property name="spacing">
</item> <number>1</number>
<item> </property>
<widget class="QLabel" name="label"> <property name="leftMargin">
<property name="text"> <number>0</number>
<string>UTC</string> </property>
</property> <property name="topMargin">
</widget> <number>0</number>
</item> </property>
</layout> <property name="rightMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="bottomMargin">
<widget class="QFrame" name="frame_3"> <number>0</number>
<property name="frameShape"> </property>
<enum>QFrame::StyledPanel</enum> <item>
</property> <widget class="QToolButton" name="beginButton">
<property name="frameShadow"> <property name="text">
<enum>QFrame::Raised</enum> <string>...</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <property name="icon">
<property name="leftMargin"> <iconset resource="../../../../scwx-qt.qrc">
<number>0</number> <normaloff>:/res/icons/font-awesome-6/backward-step-solid.svg</normaloff>:/res/icons/font-awesome-6/backward-step-solid.svg</iconset>
</property> </property>
<property name="topMargin"> </widget>
<number>0</number> </item>
</property> <item>
<property name="rightMargin"> <widget class="QToolButton" name="stepBackButton">
<number>0</number> <property name="text">
</property> <string>...</string>
<property name="bottomMargin"> </property>
<number>0</number> <property name="icon">
</property> <iconset resource="../../../../scwx-qt.qrc">
<item row="0" column="1"> <normaloff>:/res/icons/font-awesome-6/angle-left-solid.svg</normaloff>:/res/icons/font-awesome-6/angle-left-solid.svg</iconset>
<widget class="QSpinBox" name="loopTimeSpinBox"> </property>
<property name="correctionMode"> </widget>
<enum>QAbstractSpinBox::CorrectToNearestValue</enum> </item>
</property> <item>
<property name="suffix"> <widget class="QToolButton" name="playButton">
<string> min</string> <property name="text">
</property> <string>...</string>
<property name="minimum"> </property>
<number>1</number> <property name="icon">
</property> <iconset resource="../../../../scwx-qt.qrc">
<property name="maximum"> <normaloff>:/res/icons/font-awesome-6/play-solid.svg</normaloff>:/res/icons/font-awesome-6/play-solid.svg</iconset>
<number>1440</number> </property>
</property> </widget>
<property name="value"> </item>
<number>30</number> <item>
</property> <widget class="QToolButton" name="stepNextButton">
</widget> <property name="text">
</item> <string>...</string>
<item row="0" column="0"> </property>
<widget class="QLabel" name="loopTimeLabel"> <property name="icon">
<property name="text"> <iconset resource="../../../../scwx-qt.qrc">
<string>Loop Time</string> <normaloff>:/res/icons/font-awesome-6/angle-right-solid.svg</normaloff>:/res/icons/font-awesome-6/angle-right-solid.svg</iconset>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QLabel" name="loopSpeedLabel"> <widget class="QToolButton" name="endButton">
<property name="text"> <property name="text">
<string>Loop Speed</string> <string>...</string>
</property> </property>
</widget> <property name="icon">
</item> <iconset resource="../../../../scwx-qt.qrc">
<item row="1" column="1"> <normaloff>:/res/icons/font-awesome-6/forward-step-solid.svg</normaloff>:/res/icons/font-awesome-6/forward-step-solid.svg</iconset>
<widget class="QDoubleSpinBox" name="loopSpeedSpinBox"> </property>
<property name="correctionMode"> </widget>
<enum>QAbstractSpinBox::CorrectToNearestValue</enum> </item>
</property> </layout>
<property name="suffix"> </widget>
<string>x</string> </item>
</property> </layout>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="loopDelayLabel">
<property name="text">
<string>Loop Delay</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="loopDelaySpinBox">
<property name="suffix">
<string> sec</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>15.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>2.500000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="beginButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/backward-step-solid.svg</normaloff>:/res/icons/font-awesome-6/backward-step-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="stepBackButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/angle-left-solid.svg</normaloff>:/res/icons/font-awesome-6/angle-left-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="playButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/play-solid.svg</normaloff>:/res/icons/font-awesome-6/play-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="stepNextButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/angle-right-solid.svg</normaloff>:/res/icons/font-awesome-6/angle-right-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="endButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/forward-step-solid.svg</normaloff>:/res/icons/font-awesome-6/forward-step-solid.svg</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
<resources> <resources>
<include location="../../../../scwx-qt.qrc"/> <include location="../../../../scwx-qt.qrc"/>