Skip to content

Commit

Permalink
Fixed uninitialized ui element connections
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Feb 5, 2025
1 parent 632e5ba commit 899686c
Show file tree
Hide file tree
Showing 19 changed files with 217 additions and 211 deletions.
25 changes: 4 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# VSCP_PATH - set to path to local vscp repository. Default is "../vscp". Set with
# -DVSCP_PATH="path"
#
# windows
# -------
# cmake .. -G "Visual Studio 17 2022" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=G:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=G:\Qt\6.7.2\msvc2019_64\
# cmake --build . --config Debug
# set PATH=G:\Qt\Qt-6.7.2\msvc2019_64\bin;%PATH%
#


cmake_minimum_required(VERSION 3.5)
project(vscp-works-qt LANGUAGES CXX C)
Expand All @@ -56,19 +47,11 @@ include(GNUInstallDirs)
# Added extensions for curl lib find
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")

# --- Path to VSCP ---
#if (NOT DEFINED VSCP_PATH)
# set (VSCP_PATH "${PROJECT_SOURCE_DIR}/third_party/vscp")
#if (DEFINED QT_PATH)
#file(TO_CMAKE_PATH "$ENV{QT_ROOT_DIR}" QT_PATH)
#message(STATUS "QT_ROOT_DIR = $ENV{QT_ROOT_DIR}")
#endif()

#file(TO_CMAKE_PATH "$ENV{VSCP_ROOT}" VSCP_PATH)
#message(STATUS "VSCP path = $ENV{VSCP_ROOT}")

if (DEFINED QT_PATH)
file(TO_CMAKE_PATH "$ENV{QT_ROOT_DIR}" QT_PATH)
message(STATUS "QT_ROOT_DIR = $ENV{QT_ROOT_DIR}")
endif()

if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DWIN32_LEAN_AND_MEANS)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Binary versions for Linux and windows is available in the release section.
The manual is available [here](https://grodansparadis.github.io/vscp-works-qt/#/)

## Install from binary file
tbd.
See the [release section]() for binary files for Linux and Windows.


14 changes: 6 additions & 8 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


* **Introduction**
* [Start](start.md)
* [Introduction](introduction.md)
Expand All @@ -17,22 +15,22 @@
* [Settings](settings.md)

* **Connections**
* [Introduction](connections.md)
* [General](connections.md)

* **Session window**
* [Introduction](session_window.md)
* [General](session_window.md)

* **Node scan window**
* [Introduction](scan_window.md)
* [General](scan_window.md)

* **Node configuration window**
* [Introduction](config_window.md)
* [General](config_window.md)

* **Firmware update**
* [Firmware](bootload_window.md)

* **Module Description Files (MDF)**
* [Introduction](mdf.md)
* [General](mdf.md)

* **Logging, diagnostic and debugging**
* [Solving problems and troubleshooting](solving_problems.md)
Expand All @@ -44,7 +42,7 @@
* [Heartbeats](server_disovery_heartbeats.md)

* **Appendix**
* tbd
* VSCP Works + initial release walkthrough video - https://youtu.be/re_sKEjg66s

* **Other documentation**
* [Documentation Site](https://docs.vscp.org)
6 changes: 4 additions & 2 deletions docs/config_window.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Configuration window

![](images/config-standard-registers.png)

## Key shortcuts

| Key | Description |
| --- | --- |
| **ctrl + 0** / ESC | Unselect all |
| **ctrl + C** / F3 | Connect/disconnect |
| **ESC** | Unselect all |
| **F3** | Connect/disconnect |
| **ctrl + D** | defaults |
| **ctrl + E** | Edit |
| **ctrl + F** | Search |
Expand Down
Binary file added docs/images/mdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/vscpworks_watermark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/watermark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
<div id="app"></div>
<script>
window.$docsify = {
name: 'the VSCP Works Tool',
name: 'VSCP Works +',
repo: 'https://github.com/grodansparadis/vscp-works-qt',
coverpage: true,
loadSidebar: true,
autoHeader: true,
logo: './images/logo_100.png',
logo: '../images/vscpworks_watermark.png',
alias: {
'/.*/_sidebar.md': '/_sidebar.md',
},
subMaxLevel: 3,
subMaxLevel: 4,
search: 'auto', // default

// complete configuration parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/mdf.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MDF

The **M**odule **D**escription File
The **M**odule **D**escription File is described fully in the specification document [here](https://grodansparadis.github.io/vscp-doc-spec/#/./vscp_module_description_file). If you create new VSCP devices you may need to create a MDF file for them. This file is used by other devices to get information about the functionality of your device amd by VSCP Works + and other higher end software to present the device in a informative and user-friendly way.

8 changes: 8 additions & 0 deletions docs/scan_window.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Node scan

![Node scan](images/node-scan.png)

## Description

In the node scan window you can search nodes on a bus. That is you can discover nodes on a bus without waiting for them to identify themselves by sending heartbeats. In the standard case the [MDF](https://grodansparadis.github.io/vscp-doc-spec/#/./vscp_module_description_file) of a node is downloaded when the node is discovered. Discovered nodes provide instant information about themselves. You can go directly to firmware update, sessions and node configuration from the node scan window.

14 changes: 14 additions & 0 deletions docs/session_window.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,18 @@

## Known GUID's

## Key shortcuts

| Key | Description |
| --- | --- |
| **ESC** / | Unselect all |
| **F3** / | Connect/disconnect |
| **ctrl + C** | Copy row info to clipboard |
| **ctrl + E** | Add/edit row comment |
| **ctrl + L** | Load session data |
| **ctrl + M** | Toggle row mark |
| **ctrl + S** | Save session data |
| **ctrl + V** | Paste session data from clipboard |
| **ctrl + X** | Cut row and copy info to clipboard |

[For more information see](settings?id=guid)
2 changes: 1 addition & 1 deletion docs/setting_up_the_system_on_linux.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Setting up on Linux

This document describes how to set up the VSCP Works application on a Linux system. You can either build the executable from source yourself or more convenient download a binary version. Instructions on how t5o get the binary is [here](./setting_up_the_system.md).
This document describes how to set up the VSCP Works application on a Linux system. You can either build the executable from source yourself or more convenient download a binary version. Instructions on how to get the binary is [here](./setting_up_the_system.md).

## Build from source

Expand Down
4 changes: 2 additions & 2 deletions src/cdlgmqttsubscribe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ CDlgMqttSubscribe::CDlgMqttSubscribe(QWidget* parent)
: QDialog(parent)
, ui(new Ui::CDlgMqttSubscribe)
{
ui->setupUi(this);

// Help
QShortcut* shortcut = new QShortcut(QKeySequence(Qt::Key_F1), this, SLOT(showHelp()));
shortcut->setAutoRepeat(false);

QPushButton* helpButton = ui->buttonBox->button(QDialogButtonBox::Help);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));

ui->setupUi(this);
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 3 additions & 1 deletion src/cdlgselectdatacoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ CDlgSelectDataCoding::CDlgSelectDataCoding(QWidget* parent)
: QDialog(parent)
, ui(new Ui::CDlgSelectDataCoding)
{
ui->setupUi(this);

// Help
QShortcut* shortcut = new QShortcut(QKeySequence(Qt::Key_F1), this, SLOT(showHelp()));
shortcut->setAutoRepeat(false);

QPushButton* helpButton = ui->buttonBox->button(QDialogButtonBox::Help);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));

ui->setupUi(this);

}

///////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 3 additions & 1 deletion src/cdlgselectdatasize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ CDlgSelectDataSize::CDlgSelectDataSize(QWidget* parent)
: QDialog(parent)
, ui(new Ui::CDlgSelectDataSize)
{
ui->setupUi(this);

// Help
QShortcut* shortcut = new QShortcut(QKeySequence(Qt::Key_F1), this, SLOT(showHelp()));
shortcut->setAutoRepeat(false);

QPushButton* helpButton = ui->buttonBox->button(QDialogButtonBox::Help);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));

ui->setupUi(this);

}

///////////////////////////////////////////////////////////////////////////////
Expand Down
48 changes: 23 additions & 25 deletions src/cdlgselectmeasurementvalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@
// CTor
//

CDlgSelectMeasurementValue::CDlgSelectMeasurementValue(QWidget *parent) :
QDialog(parent),
ui(new Ui::CDlgSelectMeasurementValue)
CDlgSelectMeasurementValue::CDlgSelectMeasurementValue(QWidget* parent)
: QDialog(parent)
, ui(new Ui::CDlgSelectMeasurementValue)
{
ui->setupUi(this);
ui->setupUi(this);

// Help
QShortcut * shortcut = new QShortcut(QKeySequence(Qt::Key_F1),this,SLOT(showHelp()));
shortcut->setAutoRepeat(false);
// Help
QShortcut* shortcut = new QShortcut(QKeySequence(Qt::Key_F1), this, SLOT(showHelp()));
shortcut->setAutoRepeat(false);

QPushButton* helpButton = ui->buttonBox->button(QDialogButtonBox::Help);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
QPushButton* helpButton = ui->buttonBox->button(QDialogButtonBox::Help);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
}

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -75,54 +75,52 @@ connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));

CDlgSelectMeasurementValue::~CDlgSelectMeasurementValue()
{
delete ui;
delete ui;
}


///////////////////////////////////////////////////////////////////////////////
// getMeasurementValue
//

double CDlgSelectMeasurementValue::getMeasurementValue(void)
double
CDlgSelectMeasurementValue::getMeasurementValue(void)
{
return vscp_readStringValue(ui->editMeasurementValue->text().toStdString());
return vscp_readStringValue(ui->editMeasurementValue->text().toStdString());
}

///////////////////////////////////////////////////////////////////////////////
// setMeasurementValueValue
//

void CDlgSelectMeasurementValue::setMeasurementValue(double value)
void
CDlgSelectMeasurementValue::setMeasurementValue(double value)
{
vscpworks *pworks = (vscpworks *)QCoreApplication::instance();
ui->editMeasurementValue->setText(pworks->decimalToStringInBase(value));
vscpworks* pworks = (vscpworks*)QCoreApplication::instance();
ui->editMeasurementValue->setText(pworks->decimalToStringInBase(value));
}

///////////////////////////////////////////////////////////////////////////////
// getMeasurementValueConstraint
//

CSessionFilter::constraint CDlgSelectMeasurementValue::getMeasurementValueConstraint(void)
CSessionFilter::constraint
CDlgSelectMeasurementValue::getMeasurementValueConstraint(void)
{
return static_cast<CSessionFilter::constraint>(ui->comboCompareMeasurementValue->currentIndex());
return static_cast<CSessionFilter::constraint>(ui->comboCompareMeasurementValue->currentIndex());
}

///////////////////////////////////////////////////////////////////////////////
// setMeasurementValueConstraint
//

void CDlgSelectMeasurementValue::setMeasurementValueConstraint(CSessionFilter::constraint op)
void
CDlgSelectMeasurementValue::setMeasurementValueConstraint(CSessionFilter::constraint op)
{
ui->comboCompareMeasurementValue->setCurrentIndex(static_cast<int>(op));
ui->comboCompareMeasurementValue->setCurrentIndex(static_cast<int>(op));
}


// ----------------------------------------------------------------------------





///////////////////////////////////////////////////////////////////////////////
// showHelp
//
Expand Down
Loading

0 comments on commit 899686c

Please sign in to comment.