mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
chore: remove useless code
This commit is contained in:
parent
6e6949f213
commit
c0294d4eb9
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QMetaEnum>
|
#include <QMetaEnum>
|
||||||
|
|
||||||
#include "xToolsCrcInterface.h"
|
#include "xToolsCrcInterface.h"
|
||||||
@ -156,7 +155,10 @@ void xToolsCRCAssistant::textFormatControl()
|
|||||||
if (m_asciiRadioBt->isChecked()) {
|
if (m_asciiRadioBt->isChecked()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
disconnect(m_inputTextEdit, &QTextEdit::textChanged, this, &xToolsCRCAssistant::textFormatControl);
|
disconnect(m_inputTextEdit,
|
||||||
|
&QTextEdit::textChanged,
|
||||||
|
this,
|
||||||
|
&xToolsCRCAssistant::textFormatControl);
|
||||||
|
|
||||||
QString strTemp;
|
QString strTemp;
|
||||||
QString plaintext = m_inputTextEdit->toPlainText();
|
QString plaintext = m_inputTextEdit->toPlainText();
|
||||||
@ -170,7 +172,7 @@ void xToolsCRCAssistant::textFormatControl()
|
|||||||
}
|
}
|
||||||
m_inputTextEdit->setText(strTemp.toUpper());
|
m_inputTextEdit->setText(strTemp.toUpper());
|
||||||
m_inputTextEdit->moveCursor(QTextCursor::End);
|
m_inputTextEdit->moveCursor(QTextCursor::End);
|
||||||
|
|
||||||
connect(m_inputTextEdit, &QTextEdit::textChanged, this, &xToolsCRCAssistant::textFormatControl);
|
connect(m_inputTextEdit, &QTextEdit::textChanged, this, &xToolsCRCAssistant::textFormatControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
**************************************************************************************************/
|
**************************************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QUrl>
|
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
static const QString fileName()
|
static const QString fileName()
|
||||||
{
|
{
|
||||||
@ -52,9 +52,9 @@ QString xToolsSettings::settingsPath()
|
|||||||
int xToolsSettings::hdpiPolicy()
|
int xToolsSettings::hdpiPolicy()
|
||||||
{
|
{
|
||||||
#ifdef X_TOOLS_ENABLE_HIGH_DPI_POLICY
|
#ifdef X_TOOLS_ENABLE_HIGH_DPI_POLICY
|
||||||
auto var = value(mSettingsKey.hdpiPolicy);
|
auto var = value(m_settingsKey.hdpiPolicy);
|
||||||
if (var.isValid()) {
|
if (var.isValid()) {
|
||||||
return value(mSettingsKey.hdpiPolicy).toInt();
|
return value(m_settingsKey.hdpiPolicy).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
return int(QGuiApplication::highDpiScaleFactorRoundingPolicy());
|
return int(QGuiApplication::highDpiScaleFactorRoundingPolicy());
|
||||||
@ -66,7 +66,7 @@ int xToolsSettings::hdpiPolicy()
|
|||||||
void xToolsSettings::setHdpiPolicy(int policy)
|
void xToolsSettings::setHdpiPolicy(int policy)
|
||||||
{
|
{
|
||||||
#ifdef X_TOOLS_ENABLE_HIGH_DPI_POLICY
|
#ifdef X_TOOLS_ENABLE_HIGH_DPI_POLICY
|
||||||
setValue(mSettingsKey.hdpiPolicy, policy);
|
setValue(m_settingsKey.hdpiPolicy, policy);
|
||||||
emit hdpiPolicyChanged();
|
emit hdpiPolicyChanged();
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(policy)
|
Q_UNUSED(policy)
|
||||||
@ -75,9 +75,9 @@ void xToolsSettings::setHdpiPolicy(int policy)
|
|||||||
|
|
||||||
QString xToolsSettings::appStyle()
|
QString xToolsSettings::appStyle()
|
||||||
{
|
{
|
||||||
auto var = value(mSettingsKey.appStyle);
|
auto var = value(m_settingsKey.appStyle);
|
||||||
if (var.isValid()) {
|
if (var.isValid()) {
|
||||||
return value(mSettingsKey.appStyle).toString();
|
return value(m_settingsKey.appStyle).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QApplication::instance()) {
|
if (QApplication::instance()) {
|
||||||
@ -89,38 +89,38 @@ QString xToolsSettings::appStyle()
|
|||||||
|
|
||||||
void xToolsSettings::setAppStyle(const QString& style)
|
void xToolsSettings::setAppStyle(const QString& style)
|
||||||
{
|
{
|
||||||
setValue(mSettingsKey.appStyle, style);
|
setValue(m_settingsKey.appStyle, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString xToolsSettings::language()
|
QString xToolsSettings::language()
|
||||||
{
|
{
|
||||||
return value(mSettingsKey.language).toString();
|
return value(m_settingsKey.language).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void xToolsSettings::setLanguage(const QString& lan)
|
void xToolsSettings::setLanguage(const QString& lan)
|
||||||
{
|
{
|
||||||
setValue(mSettingsKey.language, lan);
|
setValue(m_settingsKey.language, lan);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool xToolsSettings::clearSettings()
|
bool xToolsSettings::clearSettings()
|
||||||
{
|
{
|
||||||
return value(mSettingsKey.clearSettings).toBool();
|
return value(m_settingsKey.clearSettings).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void xToolsSettings::setClearSettings(bool clear)
|
void xToolsSettings::setClearSettings(bool clear)
|
||||||
{
|
{
|
||||||
setValue(mSettingsKey.clearSettings, clear);
|
setValue(m_settingsKey.clearSettings, clear);
|
||||||
emit clearSettingsChanged();
|
emit clearSettingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString xToolsSettings::palette()
|
QString xToolsSettings::palette()
|
||||||
{
|
{
|
||||||
return value(mSettingsKey.palette).toString();
|
return value(m_settingsKey.palette).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void xToolsSettings::setPalette(const QString& fileName)
|
void xToolsSettings::setPalette(const QString& fileName)
|
||||||
{
|
{
|
||||||
setValue(mSettingsKey.palette, fileName);
|
setValue(m_settingsKey.palette, fileName);
|
||||||
emit paletteChanged();
|
emit paletteChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
**************************************************************************************************/
|
**************************************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <Qt>
|
#include <Qt>
|
||||||
|
|
||||||
@ -69,7 +68,5 @@ private:
|
|||||||
const QString isTextBesideIcon{"isTextBesideIcon"};
|
const QString isTextBesideIcon{"isTextBesideIcon"};
|
||||||
const QString palette{"palette"};
|
const QString palette{"palette"};
|
||||||
const QString customPalette{"customPalette"};
|
const QString customPalette{"customPalette"};
|
||||||
} mSettingsKey;
|
} m_settingsKey;
|
||||||
|
|
||||||
QLoggingCategory mLoggingCategory{"sak.settings"};
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <QActionGroup>
|
#include <QActionGroup>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMetaEnum>
|
#include <QMetaEnum>
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
**************************************************************************************************/
|
**************************************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
|
||||||
@ -27,9 +26,6 @@ public:
|
|||||||
|
|
||||||
void initialize(xToolsToolBox *toolBox, const QString &settingsGroup);
|
void initialize(xToolsToolBox *toolBox, const QString &settingsGroup);
|
||||||
|
|
||||||
private:
|
|
||||||
const QLoggingCategory mLoggingCategory{"SAK.CustomBoxUiParameters"};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::xToolsToolBoxUiCommunicationMenu *ui;
|
Ui::xToolsToolBoxUiCommunicationMenu *ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
class xToolsBaseTool : public QThread
|
class xToolsBaseTool : public QThread
|
||||||
|
|||||||
@ -40,7 +40,7 @@ void xToolsAnalyzerToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool, const Q
|
|||||||
static QByteArray tips("invalid SAKAnalyzerTool");
|
static QByteArray tips("invalid SAKAnalyzerTool");
|
||||||
Q_ASSERT_X(cookedTool, __FUNCTION__, tips.constData());
|
Q_ASSERT_X(cookedTool, __FUNCTION__, tips.constData());
|
||||||
if (!cookedTool) {
|
if (!cookedTool) {
|
||||||
qCWarning((*mLoggingCategory)) << QString::fromLatin1(tips);
|
qWarning() << QString::fromLatin1(tips);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,15 +18,8 @@ void xToolsBaseToolUi::initialize(xToolsBaseTool *tool,
|
|||||||
const char *loggingCategory)
|
const char *loggingCategory)
|
||||||
{
|
{
|
||||||
m_tool = tool;
|
m_tool = tool;
|
||||||
if (mLoggingCategory) {
|
|
||||||
delete mLoggingCategory;
|
|
||||||
mLoggingCategory = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
mLoggingCategory = new QLoggingCategory(loggingCategory);
|
|
||||||
|
|
||||||
if (!tool) {
|
if (!tool) {
|
||||||
qCWarning((*mLoggingCategory)) << "The value of tool is nullptr!";
|
qWarning() << "The value of tool is nullptr!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
**************************************************************************************************/
|
**************************************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class xToolsBaseTool;
|
class xToolsBaseTool;
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include "xToolsApplication.h"
|
#include "xToolsApplication.h"
|
||||||
|
|
||||||
xToolsEmitterToolUi::xToolsEmitterToolUi(QWidget *parent)
|
xToolsEmitterToolUi::xToolsEmitterToolUi(QWidget *parent)
|
||||||
: xToolsTableModelToolUi{"sak.emittertoolui", parent}
|
: xToolsTableModelToolUi{parent}
|
||||||
{
|
{
|
||||||
mEditor = new xToolsEmitterToolUiEditor(xToolsApplication::mainWindow());
|
mEditor = new xToolsEmitterToolUiEditor(xToolsApplication::mainWindow());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ void xToolsMaskerToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool, const QSt
|
|||||||
|
|
||||||
xToolsMaskerTool *cookedTool = qobject_cast<xToolsMaskerTool *>(tool);
|
xToolsMaskerTool *cookedTool = qobject_cast<xToolsMaskerTool *>(tool);
|
||||||
if (!cookedTool) {
|
if (!cookedTool) {
|
||||||
qCWarning((*mLoggingCategory)) << "Invalid tool type!";
|
qWarning() << "Invalid tool type!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
#include "xToolsApplication.h"
|
#include "xToolsApplication.h"
|
||||||
|
|
||||||
xToolsPrestorerToolUi::xToolsPrestorerToolUi(QWidget *parent)
|
xToolsPrestorerToolUi::xToolsPrestorerToolUi(QWidget *parent)
|
||||||
: xToolsTableModelToolUi{"SAK.PrestorerToolUi", parent}
|
: xToolsTableModelToolUi(parent)
|
||||||
{
|
{
|
||||||
mEditor = new xToolsPrestorerToolUiEditor(xToolsApplication::mainWindow());
|
mEditor = new xToolsPrestorerToolUiEditor(xToolsApplication::mainWindow());
|
||||||
mMenu = new xToolsMenu();
|
mMenu = new xToolsMenu();
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
#include "xToolsApplication.h"
|
#include "xToolsApplication.h"
|
||||||
|
|
||||||
xToolsResponserToolUi::xToolsResponserToolUi(QWidget *parent)
|
xToolsResponserToolUi::xToolsResponserToolUi(QWidget *parent)
|
||||||
: xToolsTableModelToolUi{"sak.responsertoolui", parent}
|
: xToolsTableModelToolUi{parent}
|
||||||
{
|
{
|
||||||
mEditor = new xToolsResponserToolUiEditor(xToolsApplication::mainWindow());
|
mEditor = new xToolsResponserToolUiEditor(xToolsApplication::mainWindow());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "xToolsCommunicationToolUi.h"
|
#include "xToolsCommunicationToolUi.h"
|
||||||
#include <QLoggingCategory>
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class xToolsSerialPortToolUi;
|
class xToolsSerialPortToolUi;
|
||||||
@ -26,7 +25,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
xToolsSerialPortTool *m_tool{nullptr};
|
xToolsSerialPortTool *m_tool{nullptr};
|
||||||
const QLoggingCategory mLoggingCategory{"sak.serialporttoolui"};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void checkInitializingStatus();
|
void checkInitializingStatus();
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
#include "xToolsApplication.h"
|
#include "xToolsApplication.h"
|
||||||
|
|
||||||
xToolsSerialPortTransmitterToolUi::xToolsSerialPortTransmitterToolUi(QWidget *parent)
|
xToolsSerialPortTransmitterToolUi::xToolsSerialPortTransmitterToolUi(QWidget *parent)
|
||||||
: xToolsTransmitterToolUi("SAK.SerialPortTransmitterToolUi", parent)
|
: xToolsTransmitterToolUi(parent)
|
||||||
{
|
{
|
||||||
mEditor = new xToolsSerialPortTransmitterToolUiEditor(xToolsApplication::mainWindow());
|
m_Editor = new xToolsSerialPortTransmitterToolUiEditor(xToolsApplication::mainWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void xToolsSerialPortTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool,
|
void xToolsSerialPortTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool,
|
||||||
@ -25,5 +25,5 @@ void xToolsSerialPortTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *
|
|||||||
|
|
||||||
QDialog *xToolsSerialPortTransmitterToolUi::itemEditor()
|
QDialog *xToolsSerialPortTransmitterToolUi::itemEditor()
|
||||||
{
|
{
|
||||||
return mEditor;
|
return m_Editor;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,5 +22,5 @@ protected:
|
|||||||
virtual QDialog *itemEditor() override;
|
virtual QDialog *itemEditor() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
xToolsSerialPortTransmitterToolUiEditor *mEditor;
|
xToolsSerialPortTransmitterToolUiEditor *m_Editor;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "xToolsCommunicationToolUi.h"
|
#include "xToolsCommunicationToolUi.h"
|
||||||
#include <QLoggingCategory>
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class xToolsSocketClientToolUi;
|
class xToolsSocketClientToolUi;
|
||||||
|
|||||||
@ -10,15 +10,15 @@
|
|||||||
|
|
||||||
#include "xToolsApplication.h"
|
#include "xToolsApplication.h"
|
||||||
|
|
||||||
xToolsSocketClientTransmitterToolUi::xToolsSocketClientTransmitterToolUi(const char *lg, QWidget *parent)
|
xToolsSocketClientTransmitterToolUi::xToolsSocketClientTransmitterToolUi(QWidget *parent)
|
||||||
: xToolsTransmitterToolUi(lg, parent)
|
: xToolsTransmitterToolUi(parent)
|
||||||
{
|
{
|
||||||
mEditor = new xToolsSocketClientTransmitterToolUiEditor(xToolsApplication::mainWindow());
|
m_editor = new xToolsSocketClientTransmitterToolUiEditor(xToolsApplication::mainWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
QDialog *xToolsSocketClientTransmitterToolUi::itemEditor()
|
QDialog *xToolsSocketClientTransmitterToolUi::itemEditor()
|
||||||
{
|
{
|
||||||
return mEditor;
|
return m_editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xToolsSocketClientTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool,
|
void xToolsSocketClientTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool,
|
||||||
@ -27,5 +27,5 @@ void xToolsSocketClientTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool
|
|||||||
xToolsTransmitterToolUi::onBaseToolUiInitialized(tool, settingGroup);
|
xToolsTransmitterToolUi::onBaseToolUiInitialized(tool, settingGroup);
|
||||||
setColumnVisible(4, false);
|
setColumnVisible(4, false);
|
||||||
setSectionResizeModeToStretch();
|
setSectionResizeModeToStretch();
|
||||||
mEditor->setWebSocketContextVisible(false);
|
m_editor->setWebSocketContextVisible(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,12 +14,12 @@
|
|||||||
class xToolsSocketClientTransmitterToolUi : public xToolsTransmitterToolUi
|
class xToolsSocketClientTransmitterToolUi : public xToolsTransmitterToolUi
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
xToolsSocketClientTransmitterToolUi(const char *lg, QWidget *parent = nullptr);
|
xToolsSocketClientTransmitterToolUi(QWidget *parent = nullptr);
|
||||||
virtual QDialog *itemEditor() override;
|
virtual QDialog *itemEditor() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onBaseToolUiInitialized(xToolsBaseTool *tool, const QString &settingGroup) override;
|
virtual void onBaseToolUiInitialized(xToolsBaseTool *tool, const QString &settingGroup) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
xToolsSocketClientTransmitterToolUiEditor *mEditor{nullptr};
|
xToolsSocketClientTransmitterToolUiEditor *m_editor{nullptr};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "xToolsCommunicationToolUi.h"
|
#include "xToolsCommunicationToolUi.h"
|
||||||
#include <QLoggingCategory>
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class xToolsSocketServerToolUi;
|
class xToolsSocketServerToolUi;
|
||||||
@ -27,7 +26,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
xToolsSocketServerTool *m_tool{nullptr};
|
xToolsSocketServerTool *m_tool{nullptr};
|
||||||
const QLoggingCategory mLoggingCategory{"sak.socketservertoolui"};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::xToolsSocketServerToolUi *ui{nullptr};
|
Ui::xToolsSocketServerToolUi *ui{nullptr};
|
||||||
|
|||||||
@ -33,13 +33,13 @@ xToolsStorerToolUi::~xToolsStorerToolUi()
|
|||||||
void xToolsStorerToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool, const QString &settingsGroup)
|
void xToolsStorerToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool, const QString &settingsGroup)
|
||||||
{
|
{
|
||||||
if (!tool) {
|
if (!tool) {
|
||||||
qCWarning((*mLoggingCategory)) << "The tool value is nullptr!";
|
qWarning() << "The tool value is nullptr!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xToolsStorerTool *cookedTool = qobject_cast<xToolsStorerTool *>(tool);
|
xToolsStorerTool *cookedTool = qobject_cast<xToolsStorerTool *>(tool);
|
||||||
if (!cookedTool) {
|
if (!cookedTool) {
|
||||||
qCWarning((*mLoggingCategory)) << "The cookedTool value is nullptr!";
|
qWarning() << "The cookedTool value is nullptr!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,9 +21,8 @@
|
|||||||
#include "xToolsTableModelTool.h"
|
#include "xToolsTableModelTool.h"
|
||||||
#include "xToolsApplication.h"
|
#include "xToolsApplication.h"
|
||||||
|
|
||||||
xToolsTableModelToolUi::xToolsTableModelToolUi(const char *lg, QWidget *parent)
|
xToolsTableModelToolUi::xToolsTableModelToolUi(QWidget *parent)
|
||||||
: xToolsBaseToolUi{parent}
|
: xToolsBaseToolUi{parent}
|
||||||
, mLoggingCategory{lg}
|
|
||||||
, ui(new Ui::xToolsTableModelToolUi)
|
, ui(new Ui::xToolsTableModelToolUi)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
#include <QAbstractTableModel>
|
#include <QAbstractTableModel>
|
||||||
#include <QActionGroup>
|
#include <QActionGroup>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QLoggingCategory>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
@ -27,7 +26,7 @@ class xToolsTableModelToolUi : public xToolsBaseToolUi
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit xToolsTableModelToolUi(const char *lg, QWidget *parent = nullptr);
|
explicit xToolsTableModelToolUi(QWidget *parent = nullptr);
|
||||||
~xToolsTableModelToolUi();
|
~xToolsTableModelToolUi();
|
||||||
void setStretchSections(QList<int> columns);
|
void setStretchSections(QList<int> columns);
|
||||||
void setSectionResizeModeToStretch();
|
void setSectionResizeModeToStretch();
|
||||||
@ -40,7 +39,6 @@ protected:
|
|||||||
virtual QDialog *itemEditor() = 0;
|
virtual QDialog *itemEditor() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const QLoggingCategory mLoggingCategory;
|
|
||||||
QAbstractTableModel *mTableModel{nullptr};
|
QAbstractTableModel *mTableModel{nullptr};
|
||||||
xToolsTableModelTool *mTableModelTool{nullptr};
|
xToolsTableModelTool *mTableModelTool{nullptr};
|
||||||
|
|
||||||
|
|||||||
@ -9,5 +9,5 @@
|
|||||||
#include "xToolsTcpTransmitterToolUi.h"
|
#include "xToolsTcpTransmitterToolUi.h"
|
||||||
|
|
||||||
xToolsTcpTransmitterToolUi::xToolsTcpTransmitterToolUi(QWidget *parent)
|
xToolsTcpTransmitterToolUi::xToolsTcpTransmitterToolUi(QWidget *parent)
|
||||||
: xToolsSocketClientTransmitterToolUi{"SAK.TcpTransmitterToolUi", parent}
|
: xToolsSocketClientTransmitterToolUi{parent}
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
#include "xToolsTransmitterTool.h"
|
#include "xToolsTransmitterTool.h"
|
||||||
|
|
||||||
xToolsTransmitterToolUi::xToolsTransmitterToolUi(const char *lg, QWidget *parent)
|
xToolsTransmitterToolUi::xToolsTransmitterToolUi(QWidget *parent)
|
||||||
: xToolsTableModelToolUi{lg, parent}
|
: xToolsTableModelToolUi{parent}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void xToolsTransmitterToolUi::afterRowEdited(int row)
|
void xToolsTransmitterToolUi::afterRowEdited(int row)
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class xToolsTransmitterToolUi : public xToolsTableModelToolUi
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
xToolsTransmitterToolUi(const char *lg, QWidget *parent = nullptr);
|
xToolsTransmitterToolUi(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void afterRowEdited(int row) override;
|
virtual void afterRowEdited(int row) override;
|
||||||
|
|||||||
@ -9,5 +9,5 @@
|
|||||||
#include "xToolsUdpTransmitterToolUi.h"
|
#include "xToolsUdpTransmitterToolUi.h"
|
||||||
|
|
||||||
xToolsUdpTransmitterToolUi::xToolsUdpTransmitterToolUi(QWidget *parent)
|
xToolsUdpTransmitterToolUi::xToolsUdpTransmitterToolUi(QWidget *parent)
|
||||||
: xToolsSocketClientTransmitterToolUi("SAK.SocketClientTransmitterToolUi", parent)
|
: xToolsSocketClientTransmitterToolUi(parent)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "xToolsBaseToolUi.h"
|
#include "xToolsBaseToolUi.h"
|
||||||
#include <QLoggingCategory>
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class xToolsVelometerToolUi;
|
class xToolsVelometerToolUi;
|
||||||
@ -26,6 +25,5 @@ protected:
|
|||||||
virtual void onBaseToolUiInitialized(xToolsBaseTool *tool, const QString &settingsGroup) final;
|
virtual void onBaseToolUiInitialized(xToolsBaseTool *tool, const QString &settingsGroup) final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QLoggingCategory mLoggingCategory{"sak.velometertoolui"};
|
|
||||||
Ui::xToolsVelometerToolUi *ui;
|
Ui::xToolsVelometerToolUi *ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include "xToolsWebSocketTransmitterToolUi.h"
|
#include "xToolsWebSocketTransmitterToolUi.h"
|
||||||
|
|
||||||
xToolsWebSocketTransmitterToolUi::xToolsWebSocketTransmitterToolUi(QWidget *parent)
|
xToolsWebSocketTransmitterToolUi::xToolsWebSocketTransmitterToolUi(QWidget *parent)
|
||||||
: xToolsSocketClientTransmitterToolUi("SAK.WebSocketTransmitterToolUi", parent)
|
: xToolsSocketClientTransmitterToolUi(parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void xToolsWebSocketTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool,
|
void xToolsWebSocketTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *tool,
|
||||||
@ -18,5 +18,5 @@ void xToolsWebSocketTransmitterToolUi::onBaseToolUiInitialized(xToolsBaseTool *t
|
|||||||
xToolsSocketClientTransmitterToolUi::onBaseToolUiInitialized(tool, settingGroup);
|
xToolsSocketClientTransmitterToolUi::onBaseToolUiInitialized(tool, settingGroup);
|
||||||
|
|
||||||
setColumnVisible(4, true);
|
setColumnVisible(4, true);
|
||||||
mEditor->setWebSocketContextVisible(true);
|
m_editor->setWebSocketContextVisible(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user