Created new Layout prototype.
This commit is contained in:
@@ -29,8 +29,10 @@ SOURCES += \
|
||||
bcdatamanager.cpp \
|
||||
bcdatamodel.cpp \
|
||||
bcdatavalue.cpp \
|
||||
bcdevicepanel.cpp \
|
||||
bcitemdelegate.cpp \
|
||||
bclegacy.cpp \
|
||||
bctoolbutton.cpp \
|
||||
bctransmitter.cpp \
|
||||
bcvaluetype.cpp \
|
||||
lib/can_drv_win.c \
|
||||
@@ -46,12 +48,15 @@ HEADERS += \
|
||||
bcdatamanager.h \
|
||||
bcdatamodel.h \
|
||||
bcdatavalue.h \
|
||||
bcdevicepanel.h \
|
||||
bcitemdelegate.h \
|
||||
bcmainwindow.h \
|
||||
bctoolbutton.h \
|
||||
bctransmitter.h \
|
||||
bcvaluetype.h
|
||||
|
||||
FORMS += \
|
||||
bcdevicepanel.ui \
|
||||
bcmainwindow.ui
|
||||
|
||||
# Default rules for deployment.
|
||||
|
||||
@@ -38,10 +38,14 @@ BCMainWindow::BCMainWindow(QWidget *parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
_motorlButton->setDefaultAction( _actionMotor);
|
||||
_motorButton->setDefaultAction( _motorAction);
|
||||
_consoleButton->setDefaultAction( _consoleAction );
|
||||
_batteryButton->setDefaultAction( _batteryAction );
|
||||
_pimpButton->setDefaultAction( _pimpAction);
|
||||
|
||||
_valueManager.loadXmlBikeData();
|
||||
auto model = _valueManager.getModel( BCDevice::ID::Console );
|
||||
/*
|
||||
if( model)
|
||||
{
|
||||
_valueView->setModel( *model );
|
||||
@@ -59,6 +63,7 @@ BCMainWindow::BCMainWindow(QWidget *parent)
|
||||
|
||||
connect(_delegate, &BCItemDelegate::viewUpdateNeeded, _valueView->viewport(), QOverload<>::of(&QWidget::update));
|
||||
|
||||
|
||||
//_valueView->setItemDelegate(_delegate);
|
||||
|
||||
// Highlight mit Fade-Out:
|
||||
@@ -70,7 +75,7 @@ BCMainWindow::BCMainWindow(QWidget *parent)
|
||||
connect( &_valueManager, &BCDataManager::valueTouched, _delegate, &BCItemDelegate::onHighlightRow );
|
||||
connect( _connectButton, &QPushButton::clicked, transmitter, &BCTransmitter::onToggleConnectionState );
|
||||
connect( _syncButton, &QPushButton::clicked, &_valueManager, &BCDataManager::onSyncFromDevice );
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
231
bcmainwindow.ui
231
bcmainwindow.ui
@@ -14,45 +14,113 @@
|
||||
<string>BCMainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="_centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="_controlFrame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Raised</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="_syncButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>50</y>
|
||||
<width>171</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sync</string>
|
||||
<widget class="QWidget" name="_buttonWidget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: grey;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: #aaaaaa;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="BCToolButton" name="_pimpButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BCToolButton" name="_batteryButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BCToolButton" name="_motorButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BCToolButton" name="_consoleButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="_connectButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<width>171</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>227</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_connectButton">
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
@@ -60,58 +128,38 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolButton" name="_motorlButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>240</y>
|
||||
<width>71</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_syncButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
<string>Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="_valueView">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Plain</enum>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="gridStyle">
|
||||
<enum>Qt::PenStyle::NoPen</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="_controlWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="BCDevicePanel" name="_consolePanel"/>
|
||||
<widget class="BCDevicePanel" name="_motorPanel"/>
|
||||
<widget class="BCDevicePanel" name="_batteryPanel"/>
|
||||
<widget class="BCDevicePanel" name="_pimpPanel"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="_statusbar"/>
|
||||
<action name="_actionPimp">
|
||||
<action name="_pimpAction">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:restart.png</normaloff>:restart.png</iconset>
|
||||
@@ -123,7 +171,7 @@
|
||||
<string>Pimp my Ride</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionMotor">
|
||||
<action name="_motorAction">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:bionx_motor.png</normaloff>:bionx_motor.png</iconset>
|
||||
@@ -135,7 +183,7 @@
|
||||
<string>Show motor settings</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionBattery">
|
||||
<action name="_batteryAction">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:bionx_akku.png</normaloff>:bionx_akku.png</iconset>
|
||||
@@ -147,7 +195,7 @@
|
||||
<string>Show battery settings</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionConsole">
|
||||
<action name="_consoleAction">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:bionx_console.png</normaloff>:bionx_console.png</iconset>
|
||||
@@ -159,7 +207,7 @@
|
||||
<string>Show console settings</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionExit">
|
||||
<action name="_exitAction">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:exit.png</normaloff>:exit.png</iconset>
|
||||
@@ -171,7 +219,7 @@
|
||||
<string>Exit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionConnect">
|
||||
<action name="_connectAction">
|
||||
<property name="icon">
|
||||
<iconset resource="bionxcontrol.qrc">
|
||||
<normaloff>:/connected.png</normaloff>:/connected.png</iconset>
|
||||
@@ -187,6 +235,19 @@
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BCDevicePanel</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">bcdevicepanel.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BCToolButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header location="global">bctoolbutton.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="bionxcontrol.qrc"/>
|
||||
</resources>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 18.0.1, 2025-12-22T19:04:55. -->
|
||||
<!-- Written by QtCreator 18.0.1, 2025-12-26T11:01:19. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -62,6 +62,30 @@
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">16</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="RcSync">0</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
@@ -84,7 +108,7 @@
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
@@ -140,11 +164,12 @@
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">C:/syncMePlease/projects.now/BionxControl/doc/material_dummy/material_dummy.pro</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
@@ -176,11 +201,12 @@
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">C:/syncMePlease/projects.now/BionxControl/doc/material_dummy/material_dummy.pro</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.UniqueId"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">%{RunConfig:Executable:Path}</value>
|
||||
</valuemap>
|
||||
|
||||
Reference in New Issue
Block a user