From 4a908280b887328cb038bc4419fec2a2e1512aa0 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Fri, 15 Mar 2013 17:13:20 -0400 Subject: [PATCH 1/3] Added style sheets --- src/servoboard/position.cpp | 2 +- src/servoboard/servoboard_main.ui | 110 +++++++++++++++++++++++- src/servoboard/servoboardcontroller.cpp | 4 +- src/servoboard/servocontrolbundle.ui | 100 ++++++++++++++++++++- 4 files changed, 210 insertions(+), 6 deletions(-) diff --git a/src/servoboard/position.cpp b/src/servoboard/position.cpp index 90184c5..6eceb25 100644 --- a/src/servoboard/position.cpp +++ b/src/servoboard/position.cpp @@ -31,7 +31,7 @@ void Position::init() /*Public Methods*/ -/*! \todo Do we want to reinitalize to default state on an invalid input, +/* Do we want to reinitalize to default state on an invalid input, or leave in an undetermined state? */ /*! \brief Reads and stores the data from a string into the object. diff --git a/src/servoboard/servoboard_main.ui b/src/servoboard/servoboard_main.ui index e282919..7d43a06 100644 --- a/src/servoboard/servoboard_main.ui +++ b/src/servoboard/servoboard_main.ui @@ -20,7 +20,115 @@ Form - true + false + + + QWidget{ + background-color: rgb(255, 255, 255); +} + +QTextEdit{ + border-width: 1px; + border-style: solid; + border-radius: 5px; + border-color: rgb(0, 0, 0); +} + + +QGroupBox{ + border-width: 1px; + border-style: solid; + border-radius: 5px; + border-color: rgb(0, 0, 0); + +} + + +QSpinBox { + background-color: rgb(255, 255, 255); +} + +QSlider::groove:vertical { +border: 1px solid #bbb; +background: white; +height: 68px; +border-radius: 4px; +} + +QSlider::sub-page:vertical { +background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #66e, stop: 1 #bbf); +background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1, + stop: 0 #bbf, stop: 1 #55f); +border: 1px solid #777; +height: 68px; +border-radius: 4px; +} + +QSlider::add-page:vertical { +background: #fff; +border: 1px solid #777; +height: 10px; +border-radius: 4px; +} + +QSlider::handle:vertical { +background: qlineargradient(x1:0, y1:0, x2:1, y2:1, + stop:0 #eee, stop:1 #ccc); +border: 1px solid #777; +width: 13px; +height:10px; +margin-top: -2px; +margin-bottom: -2px; +border-radius: 4px; +} + +QSlider::handle:vertical:hover { +background: qlineargradient(x1:0, y1:0, x2:1, y2:1, + stop:0 #fff, stop:1 #ddd); +border: 1px solid #444; +border-radius: 4px; +} + +QSlider::sub-page:vertical:disabled { +background: #bbb; +border-color: #999; +} + +QSlider::add-page:vertical:disabled { +background: #eee; +border-color: #999; +} + +QSlider::handle:vertical:disabled { +background: #eee; +border: 1px solid #aaa; +border-radius: 4px; +} + +QPushButton { +color: #222; +border: 2px solid #555; +border-radius: 11px; +padding: 5px; +background: qradialgradient(cx: 0.3, cy: -0.4, +fx: 0.3, fy: -0.4, +radius: 1.35, stop: 0 #fff, stop: 1 #BBB); +min-width: 80px; +} + +QPushButton:hover { +background: qradialgradient(cx: 0.3, cy: -0.4, +fx: 0.3, fy: -0.4, +radius: 1.35, stop: 0 #fff, stop: 1 #ddd); +} + +QPushButton:pressed { +background: qradialgradient(cx: 0.4, cy: -0.1, +fx: 0.4, fy: -0.1, +radius: 1.35, stop: 0 #fff, stop: 1 #fff); +} + diff --git a/src/servoboard/servoboardcontroller.cpp b/src/servoboard/servoboardcontroller.cpp index eba10e8..aaec15e 100644 --- a/src/servoboard/servoboardcontroller.cpp +++ b/src/servoboard/servoboardcontroller.cpp @@ -1,8 +1,8 @@ #include "servoboardcontroller.h" -/*! - \todo Why is the file name not part of the controller and how can this +/* + Why is the file name not part of the controller and how can this be fixed? */ QString ServoboardController::fileName = ""; diff --git a/src/servoboard/servocontrolbundle.ui b/src/servoboard/servocontrolbundle.ui index 5b38ea9..59f62b4 100644 --- a/src/servoboard/servocontrolbundle.ui +++ b/src/servoboard/servocontrolbundle.ui @@ -58,6 +58,102 @@ 100 + + QGroupBox{ + border-width: 1px; + border-style: solid; + border-radius: 5px; + border-color: rgb(0, 0, 0); + +} + + +QSpinBox { + background-color: rgb(255, 255, 255); +} + +QSlider::groove:vertical { +border: 1px solid #bbb; +background: white; +height: 68px; +border-radius: 4px; +} + +QSlider::sub-page:vertical { +background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #66e, stop: 1 #bbf); +background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1, + stop: 0 #bbf, stop: 1 #55f); +border: 1px solid #777; +height: 68px; +border-radius: 4px; +} + +QSlider::add-page:vertical { +background: #fff; +border: 1px solid #777; +height: 10px; +border-radius: 4px; +} + +QSlider::handle:vertical { +background: qlineargradient(x1:0, y1:0, x2:1, y2:1, + stop:0 #eee, stop:1 #ccc); +border: 1px solid #777; +width: 13px; +height:10px; +margin-top: -2px; +margin-bottom: -2px; +border-radius: 4px; +} + +QSlider::handle:vertical:hover { +background: qlineargradient(x1:0, y1:0, x2:1, y2:1, + stop:0 #fff, stop:1 #ddd); +border: 1px solid #444; +border-radius: 4px; +} + +QSlider::sub-page:vertical:disabled { +background: #bbb; +border-color: #999; +} + +QSlider::add-page:vertical:disabled { +background: #eee; +border-color: #999; +} + +QSlider::handle:vertical:disabled { +background: #eee; +border: 1px solid #aaa; +border-radius: 4px; +} + +QPushButton { +color: #222; +border: 2px solid #555; +border-radius: 11px; +padding: 5px; +background: qradialgradient(cx: 0.3, cy: -0.4, +fx: 0.3, fy: -0.4, +radius: 1.35, stop: 0 #fff, stop: 1 #BBB); +min-width: 80px; +} + +QPushButton:hover { +background: qradialgradient(cx: 0.3, cy: -0.4, +fx: 0.3, fy: -0.4, +radius: 1.35, stop: 0 #fff, stop: 1 #ddd); +} + +QPushButton:pressed { +background: qradialgradient(cx: 0.4, cy: -0.1, +fx: 0.4, fy: -0.1, +radius: 1.35, stop: 0 #fff, stop: 1 #fff); +} + + Servo @@ -168,7 +264,7 @@ 40 40 - 91 + 94 23 @@ -176,7 +272,7 @@ Play slider position to servo - Play + Send From c96a242107c3c8e9a870796770d13738d5376c4f Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Fri, 23 May 2014 20:54:27 -0700 Subject: [PATCH 2/3] Re-add suport for Qt 4.x with ifdefs. Fixed a bug where the UI would show a connection succeded when the connection attempt had failed --- Doxyfile | 10 ++++----- src/mainandlog/logviewerdialog.cpp | 15 +++++++++++-- src/mainandlog/logviewerdialog.h | 8 ++++++- src/mainandlog/main.cpp | 26 +++++++++++++++++++--- src/mainandlog/mainwindow.h | 13 +++++++++-- src/serialtools/connectioncontroller.cpp | 2 ++ src/serialtools/infowidget.h | 6 +++++ src/serialtools/serial_widget.cpp | 20 ++++++++++++++++- src/serialtools/serial_widget.h | 14 +++++++++--- src/serialtools/tracewidget.cpp | 7 ++++++ src/serialtools/tracewidget.h | 8 ++++++- src/servoboard/advancedlineoptionsdialog.h | 6 +++++ src/servoboard/servoboardcontroller.h | 9 +++++++- src/servoboard/servocontrolbundle.h | 8 ++++++- 14 files changed, 132 insertions(+), 20 deletions(-) diff --git a/Doxyfile b/Doxyfile index 092d8c9..00a6fd3 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1254,7 +1254,7 @@ SERVER_BASED_SEARCH = NO # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. -GENERATE_LATEX = NO +GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be @@ -1325,7 +1325,7 @@ USE_PDFLATEX = YES # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. -LATEX_BATCHMODE = NO +LATEX_BATCHMODE = YES # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) @@ -1633,7 +1633,7 @@ HIDE_UNDOC_RELATIONS = YES # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = NO +HAVE_DOT = YES # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will @@ -1668,7 +1668,7 @@ DOT_FONTPATH = # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. -CLASS_GRAPH = YES +CLASS_GRAPH = NO # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and @@ -1686,7 +1686,7 @@ GROUP_GRAPHS = YES # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. -UML_LOOK = NO +UML_LOOK = YES # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the diff --git a/src/mainandlog/logviewerdialog.cpp b/src/mainandlog/logviewerdialog.cpp index 8eaa646..3ac3cf1 100644 --- a/src/mainandlog/logviewerdialog.cpp +++ b/src/mainandlog/logviewerdialog.cpp @@ -1,13 +1,24 @@ #include "logviewerdialog.h" - +#include + +#if QT_VERSION >= 0x050000 #include #include #include #include #include +#include +#else +#include +#include +#include +#include +#include +#include +#endif + #include #include -#include #include #include #include diff --git a/src/mainandlog/logviewerdialog.h b/src/mainandlog/logviewerdialog.h index 629c3fd..a6727d5 100644 --- a/src/mainandlog/logviewerdialog.h +++ b/src/mainandlog/logviewerdialog.h @@ -1,8 +1,14 @@ #ifndef LOGVIEWERDIALOG_H #define LOGVIEWERDIALOG_H -#include +#include + +#if QT_VERSION >= 0x050000 +#include +#else +#include +#endif QT_BEGIN_NAMESPACE class QTextBrowser; class QPlainTextEdit; diff --git a/src/mainandlog/main.cpp b/src/mainandlog/main.cpp index 884f601..306efc0 100644 --- a/src/mainandlog/main.cpp +++ b/src/mainandlog/main.cpp @@ -4,7 +4,7 @@ The main function instantiates the Main Window object, to which all the various 'wigets' are attached. (ie: the serial_widget) */ - +#include #ifndef __PRETTY_FUNCTION__ #ifndef __FUNCDNAME__ @@ -21,7 +21,12 @@ */ bool VERBOSE = true; -#include +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif + #include #include #include @@ -40,11 +45,22 @@ QPointer logViewer; /*! Custom message handler that redirects messages to a log viewer (if available). */ +#if QT_VERSION >= 0x050000 void MyMessageOutput(QtMsgType Type, const QMessageLogContext& Context, const QString &Message) { if(logViewer) logViewer->outputMessage( Type, Message ); } +#else +void myMessageOutput(QtMsgType type, const char *msg) +{ + if(logViewer) + { + logViewer->outputMessage( type, msg ); + } +} +#endif + int main(int argc, char *argv[]) { @@ -59,8 +75,12 @@ int main(int argc, char *argv[]) // Instantiate a log viewer and redirect debug messages to it. logViewer = new LogViewer; - qInstallMessageHandler(MyMessageOutput); +#if QT_VERSION >= 0x050000 + qInstallMessageHandler(MyMessageOutput); +#else + qInstallMsgHandler(myMessageOutput); +#endif // Instantiate the Main Window MainWindow w(0, logViewer); w.setAttribute(Qt::WA_AlwaysShowToolTips); diff --git a/src/mainandlog/mainwindow.h b/src/mainandlog/mainwindow.h index e1b803f..0b4bdee 100644 --- a/src/mainandlog/mainwindow.h +++ b/src/mainandlog/mainwindow.h @@ -1,13 +1,22 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#include + +#if QT_VERSION >= 0x050000 #include -#include #include #include #include -#include +#else +#include +#include +#include +#include +#endif +#include +#include #include "serialtools/connectioncontroller.h" #include "servoboard/servoboardcontroller.h" diff --git a/src/serialtools/connectioncontroller.cpp b/src/serialtools/connectioncontroller.cpp index 4e79e6d..c508378 100644 --- a/src/serialtools/connectioncontroller.cpp +++ b/src/serialtools/connectioncontroller.cpp @@ -120,6 +120,8 @@ void ConnectionController::open(QString port) if (!this->port->open(QIODevice::ReadWrite)) { qDebug() << "Port failed to open in connectControl"; + view->connectionFailedWarning(); + return; } this->port->setBaudRate("9600 baud"); diff --git a/src/serialtools/infowidget.h b/src/serialtools/infowidget.h index ecf9fb6..e781354 100644 --- a/src/serialtools/infowidget.h +++ b/src/serialtools/infowidget.h @@ -1,7 +1,13 @@ #ifndef INFOWIDGET_H #define INFOWIDGET_H +#include + +#if QT_VERSION >= 0x050000 #include +#else +#include +#endif namespace Ui { class InfoWidget; diff --git a/src/serialtools/serial_widget.cpp b/src/serialtools/serial_widget.cpp index a9d416c..c985506 100644 --- a/src/serialtools/serial_widget.cpp +++ b/src/serialtools/serial_widget.cpp @@ -1,6 +1,16 @@ +#include + + +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif + #include #include -#include + + #include "serial_widget.h" #include "ui_serial_widget.h" @@ -389,6 +399,14 @@ void SerialWidget::updateInfoData(SerialDeviceEnumerator* enumerator, QString& n this->infoWidget->updateInfo(data); } } + +void SerialWidget::connectionFailedWarning() +{ + QMessageBox warn(this); + warn.setText(tr("Connection failed, check to make sure the port is not being used elsewhere")); + warn.setIcon(QMessageBox::Warning); + warn.exec(); +} /* Returns the AbstractSerial Object. diff --git a/src/serialtools/serial_widget.h b/src/serialtools/serial_widget.h index f034700..773de77 100644 --- a/src/serialtools/serial_widget.h +++ b/src/serialtools/serial_widget.h @@ -1,8 +1,16 @@ #ifndef SERIALWIDGET_H #define SERIALWIDGET_H +#include + + +#if QT_VERSION >= 0x050000 + #include + #include +#else + #include + #include +#endif -#include -#include QT_BEGIN_NAMESPACE @@ -38,7 +46,7 @@ class SerialWidget : public QWidget QStringList& parity, QStringList& stopBits, QStringList& flow); void updateInfoData(SerialDeviceEnumerator* enumerator,QString& name); - + void connectionFailedWarning(); void initSerialWidgetCloseState(); void initSerialWidgetOpenState(); diff --git a/src/serialtools/tracewidget.cpp b/src/serialtools/tracewidget.cpp index 3c78882..24d41f3 100644 --- a/src/serialtools/tracewidget.cpp +++ b/src/serialtools/tracewidget.cpp @@ -1,4 +1,11 @@ +#include + + +#if QT_VERSION >= 0x050000 #include +#else +#include +#endif #include "tracewidget.h" #include "ui_tracewidget.h" diff --git a/src/serialtools/tracewidget.h b/src/serialtools/tracewidget.h index 4c7b220..7a5d339 100644 --- a/src/serialtools/tracewidget.h +++ b/src/serialtools/tracewidget.h @@ -1,7 +1,13 @@ #ifndef TRACEWIDGET_H #define TRACEWIDGET_H +#include -#include + +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif namespace Ui { class TraceWidget; diff --git a/src/servoboard/advancedlineoptionsdialog.h b/src/servoboard/advancedlineoptionsdialog.h index 5d5ea35..26ffa12 100644 --- a/src/servoboard/advancedlineoptionsdialog.h +++ b/src/servoboard/advancedlineoptionsdialog.h @@ -1,7 +1,13 @@ #ifndef ADVANCEDLINEOPTIONSDIALOG_H #define ADVANCEDLINEOPTIONSDIALOG_H +#include + +#if QT_VERSION >= 0x050000 #include +#else + #include +#endif #include namespace Ui { diff --git a/src/servoboard/servoboardcontroller.h b/src/servoboard/servoboardcontroller.h index 5e35e10..3dd2c60 100644 --- a/src/servoboard/servoboardcontroller.h +++ b/src/servoboard/servoboardcontroller.h @@ -1,8 +1,15 @@ #ifndef SERVOBOARDCONTROLLER_H #define SERVOBOARDCONTROLLER_H +#include + + #include -#include +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif #include #include diff --git a/src/servoboard/servocontrolbundle.h b/src/servoboard/servocontrolbundle.h index 8650a9e..2a14f16 100644 --- a/src/servoboard/servocontrolbundle.h +++ b/src/servoboard/servocontrolbundle.h @@ -1,7 +1,13 @@ #ifndef SERVOCONTROLBUNDLE_H #define SERVOCONTROLBUNDLE_H +#include -#include + +#if QT_VERSION >= 0x050000 + #include +#else + #include +#endif #include "ui_servocontrolbundle.h" class ServoControlBundle : public QWidget From 68f1103508b4e577688074ffa8608823cb34b5a9 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Fri, 23 May 2014 21:06:05 -0700 Subject: [PATCH 3/3] Reverting style sheet changes --- src/servoboard/position.cpp | 2 +- src/servoboard/servoboard_main.ui | 110 +----------------------- src/servoboard/servoboardcontroller.cpp | 4 +- src/servoboard/servocontrolbundle.ui | 100 +-------------------- 4 files changed, 6 insertions(+), 210 deletions(-) diff --git a/src/servoboard/position.cpp b/src/servoboard/position.cpp index 6eceb25..90184c5 100644 --- a/src/servoboard/position.cpp +++ b/src/servoboard/position.cpp @@ -31,7 +31,7 @@ void Position::init() /*Public Methods*/ -/* Do we want to reinitalize to default state on an invalid input, +/*! \todo Do we want to reinitalize to default state on an invalid input, or leave in an undetermined state? */ /*! \brief Reads and stores the data from a string into the object. diff --git a/src/servoboard/servoboard_main.ui b/src/servoboard/servoboard_main.ui index 7d43a06..e282919 100644 --- a/src/servoboard/servoboard_main.ui +++ b/src/servoboard/servoboard_main.ui @@ -20,115 +20,7 @@ Form - false - - - QWidget{ - background-color: rgb(255, 255, 255); -} - -QTextEdit{ - border-width: 1px; - border-style: solid; - border-radius: 5px; - border-color: rgb(0, 0, 0); -} - - -QGroupBox{ - border-width: 1px; - border-style: solid; - border-radius: 5px; - border-color: rgb(0, 0, 0); - -} - - -QSpinBox { - background-color: rgb(255, 255, 255); -} - -QSlider::groove:vertical { -border: 1px solid #bbb; -background: white; -height: 68px; -border-radius: 4px; -} - -QSlider::sub-page:vertical { -background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #66e, stop: 1 #bbf); -background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1, - stop: 0 #bbf, stop: 1 #55f); -border: 1px solid #777; -height: 68px; -border-radius: 4px; -} - -QSlider::add-page:vertical { -background: #fff; -border: 1px solid #777; -height: 10px; -border-radius: 4px; -} - -QSlider::handle:vertical { -background: qlineargradient(x1:0, y1:0, x2:1, y2:1, - stop:0 #eee, stop:1 #ccc); -border: 1px solid #777; -width: 13px; -height:10px; -margin-top: -2px; -margin-bottom: -2px; -border-radius: 4px; -} - -QSlider::handle:vertical:hover { -background: qlineargradient(x1:0, y1:0, x2:1, y2:1, - stop:0 #fff, stop:1 #ddd); -border: 1px solid #444; -border-radius: 4px; -} - -QSlider::sub-page:vertical:disabled { -background: #bbb; -border-color: #999; -} - -QSlider::add-page:vertical:disabled { -background: #eee; -border-color: #999; -} - -QSlider::handle:vertical:disabled { -background: #eee; -border: 1px solid #aaa; -border-radius: 4px; -} - -QPushButton { -color: #222; -border: 2px solid #555; -border-radius: 11px; -padding: 5px; -background: qradialgradient(cx: 0.3, cy: -0.4, -fx: 0.3, fy: -0.4, -radius: 1.35, stop: 0 #fff, stop: 1 #BBB); -min-width: 80px; -} - -QPushButton:hover { -background: qradialgradient(cx: 0.3, cy: -0.4, -fx: 0.3, fy: -0.4, -radius: 1.35, stop: 0 #fff, stop: 1 #ddd); -} - -QPushButton:pressed { -background: qradialgradient(cx: 0.4, cy: -0.1, -fx: 0.4, fy: -0.1, -radius: 1.35, stop: 0 #fff, stop: 1 #fff); -} - + true diff --git a/src/servoboard/servoboardcontroller.cpp b/src/servoboard/servoboardcontroller.cpp index aaec15e..eba10e8 100644 --- a/src/servoboard/servoboardcontroller.cpp +++ b/src/servoboard/servoboardcontroller.cpp @@ -1,8 +1,8 @@ #include "servoboardcontroller.h" -/* - Why is the file name not part of the controller and how can this +/*! + \todo Why is the file name not part of the controller and how can this be fixed? */ QString ServoboardController::fileName = ""; diff --git a/src/servoboard/servocontrolbundle.ui b/src/servoboard/servocontrolbundle.ui index 59f62b4..5b38ea9 100644 --- a/src/servoboard/servocontrolbundle.ui +++ b/src/servoboard/servocontrolbundle.ui @@ -58,102 +58,6 @@ 100 - - QGroupBox{ - border-width: 1px; - border-style: solid; - border-radius: 5px; - border-color: rgb(0, 0, 0); - -} - - -QSpinBox { - background-color: rgb(255, 255, 255); -} - -QSlider::groove:vertical { -border: 1px solid #bbb; -background: white; -height: 68px; -border-radius: 4px; -} - -QSlider::sub-page:vertical { -background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #66e, stop: 1 #bbf); -background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1, - stop: 0 #bbf, stop: 1 #55f); -border: 1px solid #777; -height: 68px; -border-radius: 4px; -} - -QSlider::add-page:vertical { -background: #fff; -border: 1px solid #777; -height: 10px; -border-radius: 4px; -} - -QSlider::handle:vertical { -background: qlineargradient(x1:0, y1:0, x2:1, y2:1, - stop:0 #eee, stop:1 #ccc); -border: 1px solid #777; -width: 13px; -height:10px; -margin-top: -2px; -margin-bottom: -2px; -border-radius: 4px; -} - -QSlider::handle:vertical:hover { -background: qlineargradient(x1:0, y1:0, x2:1, y2:1, - stop:0 #fff, stop:1 #ddd); -border: 1px solid #444; -border-radius: 4px; -} - -QSlider::sub-page:vertical:disabled { -background: #bbb; -border-color: #999; -} - -QSlider::add-page:vertical:disabled { -background: #eee; -border-color: #999; -} - -QSlider::handle:vertical:disabled { -background: #eee; -border: 1px solid #aaa; -border-radius: 4px; -} - -QPushButton { -color: #222; -border: 2px solid #555; -border-radius: 11px; -padding: 5px; -background: qradialgradient(cx: 0.3, cy: -0.4, -fx: 0.3, fy: -0.4, -radius: 1.35, stop: 0 #fff, stop: 1 #BBB); -min-width: 80px; -} - -QPushButton:hover { -background: qradialgradient(cx: 0.3, cy: -0.4, -fx: 0.3, fy: -0.4, -radius: 1.35, stop: 0 #fff, stop: 1 #ddd); -} - -QPushButton:pressed { -background: qradialgradient(cx: 0.4, cy: -0.1, -fx: 0.4, fy: -0.1, -radius: 1.35, stop: 0 #fff, stop: 1 #fff); -} - - Servo @@ -264,7 +168,7 @@ radius: 1.35, stop: 0 #fff, stop: 1 #fff); 40 40 - 94 + 91 23 @@ -272,7 +176,7 @@ radius: 1.35, stop: 0 #fff, stop: 1 #fff); Play slider position to servo - Send + Play