[ref]同步711
This commit is contained in:
parent
5b3eaaf1b4
commit
c319dfbaa2
@ -1,3 +1,7 @@
|
|||||||
TEMPLATE=subdirs
|
TEMPLATE=subdirs
|
||||||
CONFIG += ordered
|
CONFIG += ordered
|
||||||
SUBDIRS+= fileSync NavigationApi NavigationTool IconActTool
|
SUBDIRS+= \
|
||||||
|
# fileSync \
|
||||||
|
NavigationApi \
|
||||||
|
NavigationTool \
|
||||||
|
IconActTool
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CFileOpt.h"
|
#include "CFileOpt.h"
|
||||||
#include "public/pub_logger_api/logger.h"
|
#include "public/pub_logger_api/logger.h"
|
||||||
#include "public/pub_utility_api/FileUtil.h"
|
#include "public/pub_utility_api/FileUtil.h"
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
CFileOpt::CFileOpt()
|
CFileOpt::CFileOpt()
|
||||||
{
|
{
|
||||||
std::string currentPath = kbd_public::CFileUtil::getCurModuleDir();
|
std::string currentPath = iot_public::CFileUtil::getCurModuleDir();
|
||||||
readColorCofig(QString::fromStdString(currentPath) + "/../../data/model/colorConfig.xml", m_strategyMap);
|
readColorCofig(QString::fromStdString(currentPath) + "/../../data/model/colorConfig.xml", m_strategyMap);
|
||||||
readIconDefaultStrategy(QString::fromStdString(currentPath) + "/../../data/model/toolbox.xml", m_iconDefaultStrategyMap);
|
readIconDefaultStrategy(QString::fromStdString(currentPath) + "/../../data/model/toolbox.xml", m_iconDefaultStrategyMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CFILEOPT_H
|
#ifndef CFILEOPT_H
|
||||||
#define CFILEOPT_H
|
#define CFILEOPT_H
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CIconActDialog.h"
|
#include "CIconActDialog.h"
|
||||||
#include "ui_CIconActDialog.h"
|
#include "ui_CIconActDialog.h"
|
||||||
#include "public/pub_utility_api/FileUtil.h"
|
#include "public/pub_utility_api/FileUtil.h"
|
||||||
#include "CTableModel.h"
|
#include "CTableModel.h"
|
||||||
@ -11,14 +11,18 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
CIconActDialog::CIconActDialog(QWidget *parent) :
|
CIconActDialog::CIconActDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
CustomUiDialog(parent),
|
||||||
ui(new Ui::CIconActDialog),
|
ui(new Ui::CIconActDialog),
|
||||||
m_pTableModel(Q_NULLPTR),
|
m_pTableModel(Q_NULLPTR),
|
||||||
m_pFileOpt(Q_NULLPTR)
|
m_pFileOpt(Q_NULLPTR)
|
||||||
{
|
{
|
||||||
|
setWindowTitle(tr("图元动作"));
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
initialize();
|
initialize();
|
||||||
|
|
||||||
|
CustomUiDialog::setAutoLayout(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIconActDialog::~CIconActDialog()
|
CIconActDialog::~CIconActDialog()
|
||||||
@ -159,7 +163,7 @@ void CIconActDialog::initialize()
|
|||||||
m_actMap.insert(ACT_LEFT_DOUCLICK, tr("左键双击"));
|
m_actMap.insert(ACT_LEFT_DOUCLICK, tr("左键双击"));
|
||||||
m_simMap.insert(SIM_FORBID, tr("禁止"));
|
m_simMap.insert(SIM_FORBID, tr("禁止"));
|
||||||
m_simMap.insert(SIM_ALLOW, tr("允许"));
|
m_simMap.insert(SIM_ALLOW, tr("允许"));
|
||||||
std::string currentPath = kbd_public::CFileUtil::getCurModuleDir();
|
std::string currentPath = iot_public::CFileUtil::getCurModuleDir();
|
||||||
CTableDelegate * iconDelegate = new CTableDelegate(this, CTableDelegate::IconFile);
|
CTableDelegate * iconDelegate = new CTableDelegate(this, CTableDelegate::IconFile);
|
||||||
iconDelegate->setFilePath(QString::fromStdString(currentPath) + "/../../data/icon/");
|
iconDelegate->setFilePath(QString::fromStdString(currentPath) + "/../../data/icon/");
|
||||||
CTableDelegate * actnDelegate = new CTableDelegate(this, CTableDelegate::ComboBox);
|
CTableDelegate * actnDelegate = new CTableDelegate(this, CTableDelegate::ComboBox);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#ifndef CICONACTDIALOG_H
|
#ifndef CICONACTDIALOG_H
|
||||||
#define CICONACTDIALOG_H
|
#define CICONACTDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
#include "pub_widget/CustomDialog.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CIconActDialog;
|
class CIconActDialog;
|
||||||
@ -10,7 +10,7 @@ class CIconActDialog;
|
|||||||
|
|
||||||
class CTableModel;
|
class CTableModel;
|
||||||
class CFileOpt;
|
class CFileOpt;
|
||||||
class CIconActDialog : public QDialog
|
class CIconActDialog : public CustomUiDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@ -46,19 +46,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="m_addBtn">
|
<widget class="QPushButton" name="m_addBtn">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -109,6 +96,19 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CICONACTPUBLIC_H
|
#ifndef CICONACTPUBLIC_H
|
||||||
#define CICONACTPUBLIC_H
|
#define CICONACTPUBLIC_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CLineEditWithBt.h"
|
#include "CLineEditWithBt.h"
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CLINEEDITWITHBT_H
|
#ifndef CLINEEDITWITHBT_H
|
||||||
#define CLINEEDITWITHBT_H
|
#define CLINEEDITWITHBT_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CTableDelegate.h"
|
#include "CTableDelegate.h"
|
||||||
#include "CLineEditWithBt.h"
|
#include "CLineEditWithBt.h"
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CTREEITEMDELEGATE_H
|
#ifndef CTREEITEMDELEGATE_H
|
||||||
#define CTREEITEMDELEGATE_H
|
#define CTREEITEMDELEGATE_H
|
||||||
|
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CTableModel.h"
|
#include "CTableModel.h"
|
||||||
#include "CIconActDialog.h"
|
#include "CIconActDialog.h"
|
||||||
|
|
||||||
CTableModel::CTableModel(QObject *parent)
|
CTableModel::CTableModel(QObject *parent)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CTABLEMODEL_H
|
#ifndef CTABLEMODEL_H
|
||||||
#define CTABLEMODEL_H
|
#define CTABLEMODEL_H
|
||||||
|
|
||||||
#include <QAbstractTableModel>
|
#include <QAbstractTableModel>
|
||||||
|
|||||||
@ -45,7 +45,8 @@ FORMS += \
|
|||||||
LIBS += \
|
LIBS += \
|
||||||
-lpub_utility_api \
|
-lpub_utility_api \
|
||||||
-llog4cplus \
|
-llog4cplus \
|
||||||
-lpub_logger_api
|
-lpub_logger_api \
|
||||||
|
-lpub_widget
|
||||||
|
|
||||||
COMMON_PRI=$$PWD/../../../common.pri
|
COMMON_PRI=$$PWD/../../../common.pri
|
||||||
exists($$COMMON_PRI) {
|
exists($$COMMON_PRI) {
|
||||||
|
|||||||
@ -1,17 +1,46 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include "common/QtAppGlobalSet.h"
|
#include "common/QtAppGlobalSet.h"
|
||||||
#include "CIconActDialog.h"
|
#include "CIconActDialog.h"
|
||||||
|
#include "pub_utility_api/FileStyle.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
kbd_common::doQtAppGlobalSet();
|
iot_common::doQtAppGlobalSet();
|
||||||
|
|
||||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||||
QTextCodec::setCodecForLocale(codec);
|
QTextCodec::setCodecForLocale(codec);
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
|
QString qss = QString();
|
||||||
|
std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss","zh","light");
|
||||||
|
|
||||||
|
QFile qssfile1(QString::fromStdString(strFullPath));
|
||||||
|
qssfile1.open(QFile::ReadOnly);
|
||||||
|
if (qssfile1.isOpen())
|
||||||
|
{
|
||||||
|
qss += QLatin1String(qssfile1.readAll());
|
||||||
|
qssfile1.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
strFullPath = iot_public::CFileStyle::getPathOfStyleFile("IconActTool.qss","zh","light");
|
||||||
|
QFile qssfile2(QString::fromStdString(strFullPath));
|
||||||
|
qssfile2.open(QFile::ReadOnly);
|
||||||
|
if (qssfile2.isOpen())
|
||||||
|
{
|
||||||
|
qss += QLatin1String(qssfile2.readAll());
|
||||||
|
qssfile2.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!qss.isEmpty())
|
||||||
|
{
|
||||||
|
qApp->setStyleSheet(qss);
|
||||||
|
}
|
||||||
|
|
||||||
|
// qApp->setFont(QFont("Microsoft YaHei",10));
|
||||||
|
|
||||||
CIconActDialog w;
|
CIconActDialog w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
||||||
#include "public/pub_utility_api/FileUtil.h"
|
#include "public/pub_utility_api/FileUtil.h"
|
||||||
#include "public/pub_logger_api/logger.h"
|
#include "public/pub_logger_api/logger.h"
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
CJsonOpt::CJsonOpt()
|
CJsonOpt::CJsonOpt()
|
||||||
{
|
{
|
||||||
std::string currentPath = kbd_public::CFileUtil::getCurModuleDir();
|
std::string currentPath = iot_public::CFileUtil::getCurModuleDir();
|
||||||
QDir dir(QString::fromStdString(currentPath));
|
QDir dir(QString::fromStdString(currentPath));
|
||||||
dir.cdUp();
|
dir.cdUp();
|
||||||
dir.cdUp();
|
dir.cdUp();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CLineEditWithBt.h"
|
#include "CLineEditWithBt.h"
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CLINEEDITWITHBT_H
|
#ifndef CLINEEDITWITHBT_H
|
||||||
#define CLINEEDITWITHBT_H
|
#define CLINEEDITWITHBT_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CNavigationDialog.h"
|
#include "CNavigationDialog.h"
|
||||||
#include "ui_CNavigationDialog.h"
|
#include "ui_CNavigationDialog.h"
|
||||||
#include "CTreeItemDelegate.h"
|
#include "CTreeItemDelegate.h"
|
||||||
#include "public/pub_utility_api/FileUtil.h"
|
#include "public/pub_utility_api/FileUtil.h"
|
||||||
@ -13,10 +13,13 @@
|
|||||||
const int Item_Role = Qt::UserRole + 1;
|
const int Item_Role = Qt::UserRole + 1;
|
||||||
|
|
||||||
CNavigationDialog::CNavigationDialog(QWidget *parent) :
|
CNavigationDialog::CNavigationDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
CustomUiMainWindow(parent),
|
||||||
ui(new Ui::CNavigationDialog),
|
ui(new Ui::CNavigationDialog),
|
||||||
m_itemIndex(0)
|
m_itemIndex(0)
|
||||||
{
|
{
|
||||||
|
setWindowTitle(tr("导航栏配置工具"));
|
||||||
|
CustomUiMainWindow::setAutoLayout(true);
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
initialize();
|
initialize();
|
||||||
@ -71,7 +74,7 @@ void CNavigationDialog::initialize()
|
|||||||
CTreeItemDelegate *boxDelegate2 = new CTreeItemDelegate(this, CTreeItemDelegate::ComboBox);
|
CTreeItemDelegate *boxDelegate2 = new CTreeItemDelegate(this, CTreeItemDelegate::ComboBox);
|
||||||
boxDelegate2->setComboMap(m_mapType);
|
boxDelegate2->setComboMap(m_mapType);
|
||||||
|
|
||||||
std::string currentPath = kbd_public::CFileUtil::getCurModuleDir();
|
std::string currentPath = iot_public::CFileUtil::getCurModuleDir();
|
||||||
QDir dir(QString::fromStdString(currentPath));
|
QDir dir(QString::fromStdString(currentPath));
|
||||||
dir.cdUp();
|
dir.cdUp();
|
||||||
dir.cdUp();
|
dir.cdUp();
|
||||||
@ -568,12 +571,12 @@ void CNavigationDialog::onConfirmClicked()
|
|||||||
QMessageBox::information(this, tr("提示"), tr("保存失败!"), QMessageBox::Ok);
|
QMessageBox::information(this, tr("提示"), tr("保存失败!"), QMessageBox::Ok);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
accept();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNavigationDialog::onCancelClicked()
|
void CNavigationDialog::onCancelClicked()
|
||||||
{
|
{
|
||||||
reject();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNavigationDialog::onExport()
|
void CNavigationDialog::onExport()
|
||||||
@ -783,7 +786,7 @@ QMap<int, QString> CNavigationDialog::makePathMap()
|
|||||||
{
|
{
|
||||||
QMap<int, QString> fileMap;
|
QMap<int, QString> fileMap;
|
||||||
QDir picDir(m_strFileHomePath + "pic" + QDir::separator());
|
QDir picDir(m_strFileHomePath + "pic" + QDir::separator());
|
||||||
std::string exePath = kbd_public::CFileUtil::getCurModuleDir();
|
std::string exePath = iot_public::CFileUtil::getCurModuleDir();
|
||||||
fileMap.insert(SWITCH_GRAPH, picDir.path());
|
fileMap.insert(SWITCH_GRAPH, picDir.path());
|
||||||
fileMap.insert(LOAD_WEBURL, picDir.path());
|
fileMap.insert(LOAD_WEBURL, picDir.path());
|
||||||
fileMap.insert(EXTERN_PRO, QString::fromStdString(exePath));
|
fileMap.insert(EXTERN_PRO, QString::fromStdString(exePath));
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#ifndef CNAVIGATIONDIALOG_H
|
#ifndef CNAVIGATIONDIALOG_H
|
||||||
#define CNAVIGATIONDIALOG_H
|
#define CNAVIGATIONDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
||||||
#include "model_excel/xlsx/xlsxdocument.h"
|
#include "model_excel/xlsx/xlsxdocument.h"
|
||||||
|
#include "pub_widget/CustomMainWindow.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CNavigationDialog;
|
class CNavigationDialog;
|
||||||
@ -12,7 +12,7 @@ class CNavigationDialog;
|
|||||||
extern const int Item_Role; //< 节点数-仅导入使用
|
extern const int Item_Role; //< 节点数-仅导入使用
|
||||||
|
|
||||||
class QTreeWidgetItem;
|
class QTreeWidgetItem;
|
||||||
class CNavigationDialog : public QDialog
|
class CNavigationDialog : public CustomUiMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@ -1,279 +1,269 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>CNavigationDialog</class>
|
<class>CNavigationDialog</class>
|
||||||
<widget class="QDialog" name="CNavigationDialog">
|
<widget class="QMainWindow" name="CNavigationDialog">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1087</width>
|
<width>800</width>
|
||||||
<height>673</height>
|
<height>600</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>导航栏配置工具</string>
|
<string>MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<property name="leftMargin">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<number>0</number>
|
<item row="0" column="0">
|
||||||
</property>
|
<widget class="QFrame" name="frame">
|
||||||
<property name="topMargin">
|
<property name="frameShape">
|
||||||
<number>0</number>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QFrame" name="frame">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="frameShadow">
|
||||||
<number>6</number>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="lineWidth">
|
||||||
<number>6</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<number>6</number>
|
<property name="leftMargin">
|
||||||
</property>
|
<number>6</number>
|
||||||
<item row="0" column="0">
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<property name="topMargin">
|
||||||
<item>
|
<number>6</number>
|
||||||
<widget class="QPushButton" name="m_add">
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="rightMargin">
|
||||||
<size>
|
<number>6</number>
|
||||||
<width>21</width>
|
</property>
|
||||||
<height>21</height>
|
<property name="bottomMargin">
|
||||||
</size>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<item row="0" column="0">
|
||||||
<size>
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<width>21</width>
|
<item>
|
||||||
<height>21</height>
|
<widget class="QPushButton" name="m_add">
|
||||||
</size>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="toolTip">
|
<width>21</width>
|
||||||
<string>添加节点</string>
|
<height>21</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>+</string>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>21</width>
|
||||||
</item>
|
<height>21</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QPushButton" name="m_upAdd">
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="toolTip">
|
||||||
<size>
|
<string>添加节点</string>
|
||||||
<width>21</width>
|
</property>
|
||||||
<height>21</height>
|
<property name="text">
|
||||||
</size>
|
<string>+</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>21</width>
|
<item>
|
||||||
<height>21</height>
|
<widget class="QPushButton" name="m_upAdd">
|
||||||
</size>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="toolTip">
|
<width>21</width>
|
||||||
<string>添加子节点</string>
|
<height>21</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>∟</string>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>21</width>
|
||||||
</item>
|
<height>21</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QPushButton" name="m_delete">
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="toolTip">
|
||||||
<size>
|
<string>添加子节点</string>
|
||||||
<width>21</width>
|
</property>
|
||||||
<height>21</height>
|
<property name="text">
|
||||||
</size>
|
<string>∟</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>21</width>
|
<item>
|
||||||
<height>21</height>
|
<widget class="QPushButton" name="m_delete">
|
||||||
</size>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="toolTip">
|
<width>21</width>
|
||||||
<string>删除节点</string>
|
<height>21</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>-</string>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>21</width>
|
||||||
</item>
|
<height>21</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QPushButton" name="m_clear">
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="toolTip">
|
||||||
<size>
|
<string>删除节点</string>
|
||||||
<width>21</width>
|
</property>
|
||||||
<height>21</height>
|
<property name="text">
|
||||||
</size>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>21</width>
|
<item>
|
||||||
<height>21</height>
|
<widget class="QPushButton" name="m_clear">
|
||||||
</size>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="toolTip">
|
<width>21</width>
|
||||||
<string>清空节点</string>
|
<height>21</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>×</string>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>21</width>
|
||||||
</item>
|
<height>21</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QPushButton" name="m_moveUp">
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="toolTip">
|
||||||
<size>
|
<string>清空节点</string>
|
||||||
<width>21</width>
|
</property>
|
||||||
<height>21</height>
|
<property name="text">
|
||||||
</size>
|
<string>×</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>21</width>
|
<item>
|
||||||
<height>21</height>
|
<widget class="QPushButton" name="m_moveUp">
|
||||||
</size>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="toolTip">
|
<width>21</width>
|
||||||
<string>上移节点</string>
|
<height>21</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>↑</string>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>21</width>
|
||||||
</item>
|
<height>21</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QPushButton" name="m_moveDown">
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="toolTip">
|
||||||
<size>
|
<string>上移节点</string>
|
||||||
<width>21</width>
|
</property>
|
||||||
<height>21</height>
|
<property name="text">
|
||||||
</size>
|
<string>↑</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>21</width>
|
<item>
|
||||||
<height>21</height>
|
<widget class="QPushButton" name="m_moveDown">
|
||||||
</size>
|
<property name="minimumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="toolTip">
|
<width>21</width>
|
||||||
<string>下移节点</string>
|
<height>21</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>↓</string>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>21</width>
|
||||||
</item>
|
<height>21</height>
|
||||||
</layout>
|
</size>
|
||||||
</item>
|
</property>
|
||||||
<item row="0" column="1">
|
<property name="toolTip">
|
||||||
<spacer name="horizontalSpacer_3">
|
<string>下移节点</string>
|
||||||
<property name="orientation">
|
</property>
|
||||||
<enum>Qt::Horizontal</enum>
|
<property name="text">
|
||||||
</property>
|
<string>↓</string>
|
||||||
<property name="sizeHint" stdset="0">
|
</property>
|
||||||
<size>
|
</widget>
|
||||||
<width>484</width>
|
</item>
|
||||||
<height>17</height>
|
</layout>
|
||||||
</size>
|
</item>
|
||||||
</property>
|
<item row="0" column="1">
|
||||||
</spacer>
|
<spacer name="horizontalSpacer_3">
|
||||||
</item>
|
<property name="orientation">
|
||||||
<item row="0" column="2">
|
<enum>Qt::Horizontal</enum>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="m_import">
|
|
||||||
<property name="text">
|
|
||||||
<string>导入</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="m_export">
|
|
||||||
<property name="text">
|
|
||||||
<string>导出</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="3">
|
|
||||||
<widget class="CTreeWidget" name="m_treeWidget">
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
</property>
|
||||||
</column>
|
<property name="sizeHint" stdset="0">
|
||||||
</widget>
|
<size>
|
||||||
</item>
|
<width>484</width>
|
||||||
<item row="2" column="0" colspan="3">
|
<height>17</height>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
</size>
|
||||||
<item>
|
</property>
|
||||||
<spacer name="horizontalSpacer">
|
</spacer>
|
||||||
<property name="orientation">
|
</item>
|
||||||
<enum>Qt::Horizontal</enum>
|
<item row="0" column="2">
|
||||||
</property>
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<property name="sizeHint" stdset="0">
|
<item>
|
||||||
<size>
|
<widget class="QPushButton" name="m_import">
|
||||||
<width>40</width>
|
<property name="text">
|
||||||
<height>20</height>
|
<string>导入</string>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</spacer>
|
</item>
|
||||||
</item>
|
<item>
|
||||||
<item>
|
<widget class="QPushButton" name="m_export">
|
||||||
<widget class="QPushButton" name="m_confirm">
|
<property name="text">
|
||||||
|
<string>导出</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
|
<widget class="CTreeWidget" name="m_treeWidget">
|
||||||
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>确认</string>
|
<string notr="true">1</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</column>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QPushButton" name="m_cancel">
|
<item row="2" column="0" colspan="3">
|
||||||
<property name="text">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<string>取消</string>
|
<item>
|
||||||
</property>
|
<spacer name="horizontalSpacer">
|
||||||
</widget>
|
<property name="orientation">
|
||||||
</item>
|
<enum>Qt::Horizontal</enum>
|
||||||
<item>
|
</property>
|
||||||
<spacer name="horizontalSpacer_2">
|
<property name="sizeHint" stdset="0">
|
||||||
<property name="orientation">
|
<size>
|
||||||
<enum>Qt::Horizontal</enum>
|
<width>40</width>
|
||||||
</property>
|
<height>20</height>
|
||||||
<property name="sizeHint" stdset="0">
|
</size>
|
||||||
<size>
|
</property>
|
||||||
<width>40</width>
|
</spacer>
|
||||||
<height>20</height>
|
</item>
|
||||||
</size>
|
<item>
|
||||||
</property>
|
<widget class="QPushButton" name="m_confirm">
|
||||||
</spacer>
|
<property name="text">
|
||||||
</item>
|
<string>确认</string>
|
||||||
</layout>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QPushButton" name="m_cancel">
|
||||||
</layout>
|
<property name="text">
|
||||||
|
<string>取消</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CTreeItemDelegate.h"
|
#include "CTreeItemDelegate.h"
|
||||||
#include "CLineEditWithBt.h"
|
#include "CLineEditWithBt.h"
|
||||||
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CTREEITEMDELEGATE_H
|
#ifndef CTREEITEMDELEGATE_H
|
||||||
#define CTREEITEMDELEGATE_H
|
#define CTREEITEMDELEGATE_H
|
||||||
|
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CTreeWidget.h"
|
#include "CTreeWidget.h"
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
CTreeWidget::CTreeWidget(QWidget *parent)
|
CTreeWidget::CTreeWidget(QWidget *parent)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CTREEWIDGET_H
|
#ifndef CTREEWIDGET_H
|
||||||
#define CTREEWIDGET_H
|
#define CTREEWIDGET_H
|
||||||
|
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
|
|||||||
@ -45,7 +45,8 @@ LIBS += \
|
|||||||
-lpub_logger_api \
|
-lpub_logger_api \
|
||||||
-lpub_utility_api \
|
-lpub_utility_api \
|
||||||
-lmodel_excel \
|
-lmodel_excel \
|
||||||
-lNavigationApi
|
-lNavigationApi \
|
||||||
|
-lpub_widget
|
||||||
|
|
||||||
COMMON_PRI=$$PWD/../../../common.pri
|
COMMON_PRI=$$PWD/../../../common.pri
|
||||||
exists($$COMMON_PRI) {
|
exists($$COMMON_PRI) {
|
||||||
|
|||||||
@ -1,13 +1,41 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "common/QtAppGlobalSet.h"
|
#include "common/QtAppGlobalSet.h"
|
||||||
#include "CNavigationDialog.h"
|
#include "CNavigationDialog.h"
|
||||||
|
#include "pub_utility_api/FileStyle.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
kbd_common::doQtAppGlobalSet();
|
iot_common::doQtAppGlobalSet();
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
QString qss = QString();
|
||||||
|
std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss","zh","light");
|
||||||
|
|
||||||
|
QFile qssfile1(QString::fromStdString(strFullPath));
|
||||||
|
qssfile1.open(QFile::ReadOnly);
|
||||||
|
if (qssfile1.isOpen())
|
||||||
|
{
|
||||||
|
qss += QLatin1String(qssfile1.readAll());
|
||||||
|
qssfile1.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
strFullPath = iot_public::CFileStyle::getPathOfStyleFile("NavigationTool.qss","zh","light");
|
||||||
|
QFile qssfile2(QString::fromStdString(strFullPath));
|
||||||
|
qssfile2.open(QFile::ReadOnly);
|
||||||
|
if (qssfile2.isOpen())
|
||||||
|
{
|
||||||
|
qss += QLatin1String(qssfile2.readAll());
|
||||||
|
qssfile2.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!qss.isEmpty())
|
||||||
|
{
|
||||||
|
qApp->setStyleSheet(qss);
|
||||||
|
}
|
||||||
|
|
||||||
|
// qApp->setFont(QFont("Microsoft YaHei",10));
|
||||||
|
|
||||||
CNavigationDialog w;
|
CNavigationDialog w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CConfirmDialog.h"
|
#include "CConfirmDialog.h"
|
||||||
#include "ui_CConfirmDialog.h"
|
#include "ui_CConfirmDialog.h"
|
||||||
|
|
||||||
CConfirmDialog::CConfirmDialog(QWidget *parent) :
|
CConfirmDialog::CConfirmDialog(QWidget *parent) :
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CCONFIRMDIALOG_H
|
#ifndef CCONFIRMDIALOG_H
|
||||||
#define CCONFIRMDIALOG_H
|
#define CCONFIRMDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
@ -9,7 +9,7 @@ namespace Ui {
|
|||||||
class CConfirmDialog;
|
class CConfirmDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace kbd_sys;
|
using namespace iot_sys;
|
||||||
class CConfirmDialog : public QDialog
|
class CConfirmDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "CFileSyncDialog.h"
|
#include "CFileSyncDialog.h"
|
||||||
#include "ui_CFileSyncDialog.h"
|
#include "ui_CFileSyncDialog.h"
|
||||||
#include "CConfirmDialog.h"
|
#include "CConfirmDialog.h"
|
||||||
#include "../include/public/pub_utility_api/I18N.h"
|
#include "../include/public/pub_utility_api/I18N.h"
|
||||||
@ -18,7 +18,7 @@ CFileSyncDialog::CFileSyncDialog(QDialog *parent) :
|
|||||||
{
|
{
|
||||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf8"));
|
QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf8"));
|
||||||
|
|
||||||
if(kbd_public::getCurLanguage() == "en")
|
if(iot_public::getCurLanguage() == "en")
|
||||||
{
|
{
|
||||||
QTranslator * sysTranslator = new QTranslator(this);
|
QTranslator * sysTranslator = new QTranslator(this);
|
||||||
sysTranslator->load(":/fileSync_en.qm");
|
sysTranslator->load(":/fileSync_en.qm");
|
||||||
@ -289,7 +289,7 @@ void CFileSyncDialog::getFileInfos(const QString &path, QFileInfoList &list)
|
|||||||
|
|
||||||
void CFileSyncDialog::getSvnFile(const QString &path, QMap<QString, stFileStatus> &name, QString& error)
|
void CFileSyncDialog::getSvnFile(const QString &path, QMap<QString, stFileStatus> &name, QString& error)
|
||||||
{
|
{
|
||||||
QVector<kbd_sys::stFileStatus> vecFileStatus;
|
QVector<iot_sys::stFileStatus> vecFileStatus;
|
||||||
|
|
||||||
QStringList list;
|
QStringList list;
|
||||||
list.append(path);
|
list.append(path);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#ifndef CFILESYNCDIALOG_H
|
#ifndef CFILESYNCDIALOG_H
|
||||||
#define CFILESYNCDIALOG_H
|
#define CFILESYNCDIALOG_H
|
||||||
|
|
||||||
#include "../../include/sys/sys_svn_file_sync_api/CSysFileSyncApi.h"
|
#include "../../include/sys/sys_svn_file_sync_api/CSysFileSyncApi.h"
|
||||||
@ -26,7 +26,7 @@ struct stSelectedPath
|
|||||||
QStringList path;
|
QStringList path;
|
||||||
};
|
};
|
||||||
|
|
||||||
using namespace kbd_sys;
|
using namespace iot_sys;
|
||||||
class CFileSyncDialog : public QDialog
|
class CFileSyncDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "common/QtAppGlobalSet.h"
|
#include "common/QtAppGlobalSet.h"
|
||||||
#include "CFileSyncDialog.h"
|
#include "CFileSyncDialog.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
kbd_common::doQtAppGlobalSet();
|
iot_common::doQtAppGlobalSet();
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
CFileSyncDialog w;
|
CFileSyncDialog w;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user