Add UI elements for a new remote connection system. Just UI and settings for now.
This commit is contained in:
@@ -52,6 +52,7 @@ ConnectionWindow::ConnectionWindow(QWidget *parent) :
|
||||
connect(ui->rbGVRET, &QAbstractButton::clicked, this, &ConnectionWindow::handleConnTypeChanged);
|
||||
connect(ui->rbKvaser, &QAbstractButton::clicked, this, &ConnectionWindow::handleConnTypeChanged);
|
||||
connect(ui->rbSocketCAN, &QAbstractButton::clicked, this, &ConnectionWindow::handleConnTypeChanged);
|
||||
connect(ui->rbRemote, &QAbstractButton::clicked, this, &ConnectionWindow::handleConnTypeChanged);
|
||||
connect(ui->tableConnections->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &ConnectionWindow::currentRowChanged);
|
||||
connect(ui->btnActivateAll, &QPushButton::clicked, this, &ConnectionWindow::handleEnableAll);
|
||||
connect(ui->btnDeactivateAll, &QPushButton::clicked, this, &ConnectionWindow::handleDisableAll);
|
||||
@@ -226,6 +227,7 @@ void ConnectionWindow::handleConnTypeChanged()
|
||||
if (ui->rbGVRET->isChecked()) selectSerial();
|
||||
if (ui->rbKvaser->isChecked()) selectKvaser();
|
||||
if (ui->rbSocketCAN->isChecked()) selectSocketCan();
|
||||
if (ui->rbRemote->isChecked()) selectRemote();
|
||||
}
|
||||
|
||||
|
||||
@@ -327,6 +329,7 @@ void ConnectionWindow::handleSendText() {
|
||||
|
||||
void ConnectionWindow::selectSerial()
|
||||
{
|
||||
ui->lPort->setText("Port:");
|
||||
/* set combobox page visible */
|
||||
ui->stPort->setCurrentWidget(ui->cbPage);
|
||||
|
||||
@@ -339,16 +342,24 @@ void ConnectionWindow::selectSerial()
|
||||
|
||||
void ConnectionWindow::selectKvaser()
|
||||
{
|
||||
ui->lPort->setText("Port:");
|
||||
/* set combobox page visible */
|
||||
ui->stPort->setCurrentWidget(ui->cbPage);
|
||||
}
|
||||
|
||||
void ConnectionWindow::selectSocketCan()
|
||||
{
|
||||
ui->lPort->setText("Port:");
|
||||
/* set edit text page visible */
|
||||
ui->stPort->setCurrentWidget(ui->etPage);
|
||||
}
|
||||
|
||||
void ConnectionWindow::selectRemote()
|
||||
{
|
||||
ui->lPort->setText("Access Key:");
|
||||
ui->stPort->setCurrentWidget(ui->etPage);
|
||||
}
|
||||
|
||||
void ConnectionWindow::setSpeed(int speed0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ private:
|
||||
void selectSerial();
|
||||
void selectKvaser();
|
||||
void selectSocketCan();
|
||||
void selectRemote();
|
||||
bool isSocketCanAvailable();
|
||||
int getSpeed();
|
||||
QString getPortName();
|
||||
|
||||
@@ -28,6 +28,9 @@ MainSettingsDialog::MainSettingsDialog(QWidget *parent) :
|
||||
ui->cbValidate->setChecked(settings->value("Main/ValidateComm", true).toBool());
|
||||
ui->spinPlaybackSpeed->setValue(settings->value("Playback/DefSpeed", 5).toInt());
|
||||
ui->lineClockFormat->setText(settings->value("Main/TimeFormat", "MMM-dd HH:mm:ss.zzz").toString());
|
||||
ui->lineRemoteHost->setText(settings->value("Remote/Host", "api.savvycan.com").toString());
|
||||
ui->lineRemotePort->setText(settings->value("Remote/Port", "21315").toString()); // = 0x5343 = SC. Yep, really creative port number
|
||||
ui->cbAutoStartRemote->setChecked(settings->value("Remote/AutoStart", false).toBool());
|
||||
|
||||
ui->spinFontSize->setValue(settings->value("Main/FontSize", ui->cbDisplayHex->font().pointSize()).toUInt());
|
||||
|
||||
@@ -76,6 +79,9 @@ MainSettingsDialog::MainSettingsDialog(QWidget *parent) :
|
||||
connect(ui->cbUseFiltered, SIGNAL(toggled(bool)), this, SLOT(updateSettings()));
|
||||
connect(ui->lineClockFormat, SIGNAL(editingFinished()), this, SLOT(updateSettings()));
|
||||
connect(ui->cbUseOpenGL, SIGNAL(toggled(bool)), this, SLOT(updateSettings()));
|
||||
connect(ui->cbAutoStartRemote, SIGNAL(toggled(bool)), this, SLOT(updateSettings()));
|
||||
connect(ui->lineRemoteHost, SIGNAL(editingFinished()), this, SLOT(updateSettings()));
|
||||
connect(ui->lineRemotePort, SIGNAL(editingFinished()), this, SLOT(updateSettings()));
|
||||
installEventFilter(this);
|
||||
}
|
||||
|
||||
@@ -130,6 +136,9 @@ void MainSettingsDialog::updateSettings()
|
||||
settings->setValue("Main/UseOpenGL", ui->cbUseOpenGL->isChecked());
|
||||
settings->setValue("Main/TimeFormat", ui->lineClockFormat->text());
|
||||
settings->setValue("Main/FontSize", ui->spinFontSize->value());
|
||||
settings->setValue("Remote/Host", ui->lineRemoteHost->text());
|
||||
settings->setValue("Remote/Port", ui->lineRemotePort->text());
|
||||
settings->setValue("Remote/AutoStart", ui->cbAutoStartRemote->isChecked());
|
||||
|
||||
settings->sync();
|
||||
emit updatedSettings();
|
||||
|
||||
+20
-13
@@ -80,18 +80,8 @@
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbGVRET">
|
||||
<property name="text">
|
||||
<string>GVRET Serial</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="rbKvaser">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -101,7 +91,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="rbGVRET">
|
||||
<property name="text">
|
||||
<string>GVRET Serial</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="rbSocketCAN">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -111,6 +111,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="rbRemote">
|
||||
<property name="text">
|
||||
<string>Remote Host</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
+105
-37
@@ -6,14 +6,32 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>850</height>
|
||||
<width>965</width>
|
||||
<height>585</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Main Settings</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="1,1">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Main Form Settings:</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbMainAutoScroll">
|
||||
<property name="text">
|
||||
<string>Autoscroll main frame window by default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
@@ -41,6 +59,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbUseFiltered">
|
||||
<property name="text">
|
||||
<string>Use filtered frames in sub-windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbUseOpenGL">
|
||||
<property name="text">
|
||||
<string>OpenGL Accelerated AntiAliased Graphing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="title">
|
||||
@@ -109,20 +141,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbUseFiltered">
|
||||
<property name="text">
|
||||
<string>Use filtered frames in sub-windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbUseOpenGL">
|
||||
<property name="text">
|
||||
<string>OpenGL Accelerated AntiAliased Graphing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<property name="title">
|
||||
@@ -145,25 +163,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Main Form Settings:</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbMainAutoScroll">
|
||||
<property name="text">
|
||||
<string>Autoscroll main frame window by default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
@@ -187,6 +186,26 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<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>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
@@ -251,6 +270,42 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_8">
|
||||
<property name="title">
|
||||
<string>Remote Connection:</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Host:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Port:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineRemoteHost"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineRemotePort"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="cbAutoStartRemote">
|
||||
<property name="text">
|
||||
<string>Auto start remote hosting</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
@@ -261,6 +316,21 @@
|
||||
</property>
|
||||
</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>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
@@ -271,8 +341,6 @@
|
||||
<tabstop>rbMicros</tabstop>
|
||||
<tabstop>rbSysClock</tabstop>
|
||||
<tabstop>lineClockFormat</tabstop>
|
||||
<tabstop>cbUseFiltered</tabstop>
|
||||
<tabstop>cbUseOpenGL</tabstop>
|
||||
<tabstop>cbMainAutoScroll</tabstop>
|
||||
<tabstop>cbFlowUseTimestamp</tabstop>
|
||||
<tabstop>cbFlowAutoRef</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user