Skip to content

Commit

Permalink
Renamed bit and value edit files and fialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Feb 2, 2024
1 parent c84453d commit 265dabb
Show file tree
Hide file tree
Showing 25 changed files with 3,041 additions and 903 deletions.
71 changes: 45 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ qt5_wrap_ui(UI src/mainwindow.ui
src/cdlgactionparam.ui
srd/cdlgdatepicker.ui
src/cfrmmdf.ui
src/cdlgmdfmodule.ui
src/cdlgmdfdm.ui
src/cdlgmdfmodule.ui
src/cdlgmdffilepicture.ui
src/cdlgmdfmodule.ui
src/cdlgmdfevent.ui
Expand All @@ -261,19 +260,24 @@ qt5_wrap_ui(UI src/mainwindow.ui

src/cdlgmdfregister.ui
src/cdlgmdfregisterlist.ui
src/cdlgmdfregisterbit.ui
src/cdlgmdfregisterbitlist.ui
src/cdlgmdfregistervalue.ui
src/cdlgmdfregistervaluelist.ui

src/cdlgmdfbit.ui
src/cdlgmdfbitlist.ui
src/cdlgmdfvalue.ui
src/cdlgmdfvaluelist.ui

src/cdlgmdfregistermapping.ui

src/cdlgmdfremotevar.ui
src/cdlgmdfremotevarlist.ui
src/cdlgmdfremotevarbitlist.ui
src/cdlgmdfremotevarbit.ui
src/cdlgmdfremotevarvaluelist.ui
src/cdlgmdfremotevarvalue.ui
# src/cdlgmdfremotevarbitlist.ui
# src/cdlgmdfremotevarbit.ui
# src/cdlgmdfremotevarvaluelist.ui
# src/cdlgmdfremotevarvalue.ui

src/cdlgmdfdm.ui
src/cdlgmdfdmaction.ui
str/cdlgmdfdmactionparam.ui
)

add_executable(${PROJECT_NAME}
Expand Down Expand Up @@ -584,25 +588,25 @@ add_executable(${PROJECT_NAME}
src/cdlgmdfregisterlist.cpp
src/cdlgmdfregisterlist.h

build/ui_cdlgmdfregisterbit.h
src/cdlgmdfregisterbit.ui
src/cdlgmdfregisterbit.cpp
src/cdlgmdfregisterbit.h
build/ui_cdlgmdfbit.h
src/cdlgmdfbit.ui
src/cdlgmdfbit.cpp
src/cdlgmdfbit.h

build/ui_cdlgmdfregisterbitlist.h
src/cdlgmdfregisterbitlist.ui
src/cdlgmdfregisterbitlist.cpp
src/cdlgmdfregisterbitlist.h
build/ui_cdlgmdfbitlist.h
src/cdlgmdfbitlist.ui
src/cdlgmdfbitlist.cpp
src/cdlgmdfbitlist.h

build/ui_cdlgmdfregistervalue.h
src/cdlgmdfregistervalue.ui
src/cdlgmdfregistervalue.cpp
src/cdlgmdfregistervalue.h
build/ui_cdlgmdfvalue.h
src/cdlgmdfvalue.ui
src/cdlgmdfvalue.cpp
src/cdlgmdfvalue.h

build/ui_cdlgmdfregistervaluelist.h
src/cdlgmdfregistervaluelist.ui
src/cdlgmdfregistervaluelist.cpp
src/cdlgmdfregistervaluelist.h
build/ui_cdlgmdfvaluelist.h
src/cdlgmdfvaluelist.ui
src/cdlgmdfvaluelist.cpp
src/cdlgmdfvaluelist.h

build/ui_cdlgmdfremotevar.h
src/cdlgmdfremotevar.ui
Expand All @@ -614,6 +618,21 @@ add_executable(${PROJECT_NAME}
src/cdlgmdfremotevarlist.cpp
src/cdlgmdfremotevarlist.h

build/ui_cdlgmdfdm.h
src/cdlgmdfdm.ui
src/cdlgmdfdm.cpp
src/cdlgmdfdm.h

build/ui_cdlgmdfdmaction.h
src/cdlgmdfdmaction.ui
src/cdlgmdfdmaction.cpp
src/cdlgmdfdmaction.h

build/ui_cdlgmdfdmactionparam.h
src/cdlgmdfdmactionparam.ui
src/cdlgmdfdmactionparam.cpp
src/cdlgmdfdmactionparam.h

${VSCP_PATH}/src/vscp/common/version.h
${VSCP_PATH}/src/vscp/common/vscp.h
${VSCP_PATH}/src/vscp/common/vscpremotetcpif.h
Expand Down
46 changes: 23 additions & 23 deletions src/cdlgmdfregisterbit.cpp → src/cdlgmdfbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

#include <vscpworks.h>

#include "cdlgmdfregisterbit.h"
#include "ui_cdlgmdfregisterbit.h"
#include "cdlgmdfbit.h"
#include "ui_cdlgmdfbit.h"

#include <QColorDialog>
#include <QDate>
Expand All @@ -49,15 +49,15 @@
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>

const char CDlgMdfRegisterBit::pre_str_registerbit[] = "Register bit: ";
const char CDlgMdfBit::pre_str_registerbit[] = "Register bit: ";

///////////////////////////////////////////////////////////////////////////////
// CTor
//

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

Expand All @@ -75,7 +75,7 @@ CDlgMdfRegisterBit::CDlgMdfRegisterBit(QWidget* parent)
// DTor
//

CDlgMdfRegisterBit::~CDlgMdfRegisterBit()
CDlgMdfBit::~CDlgMdfBit()
{
delete ui;
}
Expand All @@ -85,7 +85,7 @@ CDlgMdfRegisterBit::~CDlgMdfRegisterBit()
//

void
CDlgMdfRegisterBit::initDialogData(CMDF_Bit* pbit, int index, mdf_record_type type)
CDlgMdfBit::initDialogData(CMDF_Bit* pbit, int index, mdf_record_type type)
{
QString str;

Expand Down Expand Up @@ -167,7 +167,7 @@ CDlgMdfRegisterBit::initDialogData(CMDF_Bit* pbit, int index, mdf_record_type ty
//

void
CDlgMdfRegisterBit::setInitialFocus(void)
CDlgMdfBit::setInitialFocus(void)
{
// ui->editName->setFocus();
}
Expand All @@ -177,27 +177,27 @@ CDlgMdfRegisterBit::setInitialFocus(void)
// ----------------------------------------------------------------------------

QString
CDlgMdfRegisterBit::getName(void)
CDlgMdfBit::getName(void)
{
return ui->editName->text();
};

void
CDlgMdfRegisterBit::setName(const QString& name)
CDlgMdfBit::setName(const QString& name)
{
ui->editName->setText(name);
};

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

uint8_t
CDlgMdfRegisterBit::getPos(void)
CDlgMdfBit::getPos(void)
{
return ui->spinPos->value();
}

void
CDlgMdfRegisterBit::setPos(uint8_t span)
CDlgMdfBit::setPos(uint8_t span)
{
ui->spinPos->setValue(span);
}
Expand All @@ -206,69 +206,69 @@ CDlgMdfRegisterBit::setPos(uint8_t span)
// -----------------------------------------------------------------------

uint8_t
CDlgMdfRegisterBit::getWidth(void)
CDlgMdfBit::getWidth(void)
{
return ui->spinWidth->value();
}

void
CDlgMdfRegisterBit::setWidth(uint8_t span)
CDlgMdfBit::setWidth(uint8_t span)
{
ui->spinWidth->setValue(span);
}

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

uint8_t
CDlgMdfRegisterBit::getDefault(void)
CDlgMdfBit::getDefault(void)
{
return ui->spinDefault->value();
}

void
CDlgMdfRegisterBit::setDefault(uint8_t span)
CDlgMdfBit::setDefault(uint8_t span)
{
ui->spinDefault->setValue(span);
}

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

uint8_t
CDlgMdfRegisterBit::getMin(void)
CDlgMdfBit::getMin(void)
{
return ui->spinMin->value();
}

void
CDlgMdfRegisterBit::setMin(uint8_t min)
CDlgMdfBit::setMin(uint8_t min)
{
ui->spinMin->setValue(min);
}

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

uint8_t
CDlgMdfRegisterBit::getMax(void)
CDlgMdfBit::getMax(void)
{
return ui->spinMax->value();
}

void
CDlgMdfRegisterBit::setMax(uint8_t span)
CDlgMdfBit::setMax(uint8_t span)
{
ui->spinMax->setValue(span);
}

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

mdf_access_mode
CDlgMdfRegisterBit::getAccess(void)
CDlgMdfBit::getAccess(void)
{
return static_cast<mdf_access_mode>(ui->comboAccess->currentIndex());
}

void
CDlgMdfRegisterBit::setAccess(uint8_t access)
CDlgMdfBit::setAccess(uint8_t access)
{
if (access <= MDF_REG_ACCESS_READ_WRITE) {
ui->comboAccess->setCurrentIndex(access);
Expand All @@ -282,7 +282,7 @@ CDlgMdfRegisterBit::setAccess(uint8_t access)
//

void
CDlgMdfRegisterBit::accept()
CDlgMdfBit::accept()
{
std::string str;
if (nullptr != m_pbit) {
Expand Down
14 changes: 7 additions & 7 deletions src/cdlgmdfregisterbit.h → src/cdlgmdfbit.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
// SOFTWARE.
//

#ifndef CDLGMDFREGISTERBIT_H
#define CDLGMDFREGISTERBIT_H
#ifndef CDLGMDFBIT_H
#define CDLGMDFBIT_H

#include <mdf.h>
#include <vscpworks.h>

#include <QDialog>

namespace Ui {
class CDlgMdfRegisterBit;
class CDlgMdfBit;
}

class CDlgMdfRegisterBit : public QDialog {
class CDlgMdfBit : public QDialog {
Q_OBJECT

public:
public:
explicit CDlgMdfRegisterBit(QWidget* parent = nullptr);
~CDlgMdfRegisterBit();
explicit CDlgMdfBit(QWidget* parent = nullptr);
~CDlgMdfBit();

static const int index_name = 0;
static const int index_pos = 1;
Expand Down Expand Up @@ -110,7 +110,7 @@ public slots:
void accept(void);

private:
Ui::CDlgMdfRegisterBit* ui;
Ui::CDlgMdfBit* ui;

/// Pointer to MDF
CMDF* m_pmdf;
Expand Down
8 changes: 4 additions & 4 deletions src/cdlgmdfregisterbit.ui → src/cdlgmdfbit.ui
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CDlgMdfRegisterBit</class>
<widget class="QDialog" name="CDlgMdfRegisterBit">
<class>CDlgMdfBit</class>
<widget class="QDialog" name="CDlgMdfBit">
<property name="geometry">
<rect>
<x>0</x>
Expand Down Expand Up @@ -163,7 +163,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>CDlgMdfRegisterBit</receiver>
<receiver>CDlgMdfBit</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
Expand All @@ -179,7 +179,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>CDlgMdfRegisterBit</receiver>
<receiver>CDlgMdfBit</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down
Loading

0 comments on commit 265dabb

Please sign in to comment.