[ref]同步711
This commit is contained in:
parent
5b3eaaf1b4
commit
c319dfbaa2
@ -1,3 +1,7 @@
|
||||
TEMPLATE=subdirs
|
||||
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_utility_api/FileUtil.h"
|
||||
#include <QFile>
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
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);
|
||||
readIconDefaultStrategy(QString::fromStdString(currentPath) + "/../../data/model/toolbox.xml", m_iconDefaultStrategyMap);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFILEOPT_H
|
||||
#ifndef CFILEOPT_H
|
||||
#define CFILEOPT_H
|
||||
|
||||
#include <QMap>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CIconActDialog.h"
|
||||
#include "CIconActDialog.h"
|
||||
#include "ui_CIconActDialog.h"
|
||||
#include "public/pub_utility_api/FileUtil.h"
|
||||
#include "CTableModel.h"
|
||||
@ -11,14 +11,18 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
CIconActDialog::CIconActDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
CustomUiDialog(parent),
|
||||
ui(new Ui::CIconActDialog),
|
||||
m_pTableModel(Q_NULLPTR),
|
||||
m_pFileOpt(Q_NULLPTR)
|
||||
{
|
||||
setWindowTitle(tr("图元动作"));
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
initialize();
|
||||
|
||||
CustomUiDialog::setAutoLayout(true);
|
||||
}
|
||||
|
||||
CIconActDialog::~CIconActDialog()
|
||||
@ -159,7 +163,7 @@ void CIconActDialog::initialize()
|
||||
m_actMap.insert(ACT_LEFT_DOUCLICK, tr("左键双击"));
|
||||
m_simMap.insert(SIM_FORBID, 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);
|
||||
iconDelegate->setFilePath(QString::fromStdString(currentPath) + "/../../data/icon/");
|
||||
CTableDelegate * actnDelegate = new CTableDelegate(this, CTableDelegate::ComboBox);
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
#ifndef CICONACTDIALOG_H
|
||||
#ifndef CICONACTDIALOG_H
|
||||
#define CICONACTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMap>
|
||||
#include "pub_widget/CustomDialog.h"
|
||||
|
||||
namespace Ui {
|
||||
class CIconActDialog;
|
||||
@ -10,7 +10,7 @@ class CIconActDialog;
|
||||
|
||||
class CTableModel;
|
||||
class CFileOpt;
|
||||
class CIconActDialog : public QDialog
|
||||
class CIconActDialog : public CustomUiDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@ -46,19 +46,6 @@
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<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>
|
||||
<widget class="QPushButton" name="m_addBtn">
|
||||
<property name="sizePolicy">
|
||||
@ -109,6 +96,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CICONACTPUBLIC_H
|
||||
#ifndef CICONACTPUBLIC_H
|
||||
#define CICONACTPUBLIC_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CLineEditWithBt.h"
|
||||
#include "CLineEditWithBt.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QEvent>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CLINEEDITWITHBT_H
|
||||
#ifndef CLINEEDITWITHBT_H
|
||||
#define CLINEEDITWITHBT_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTableDelegate.h"
|
||||
#include "CTableDelegate.h"
|
||||
#include "CLineEditWithBt.h"
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTREEITEMDELEGATE_H
|
||||
#ifndef CTREEITEMDELEGATE_H
|
||||
#define CTREEITEMDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTableModel.h"
|
||||
#include "CTableModel.h"
|
||||
#include "CIconActDialog.h"
|
||||
|
||||
CTableModel::CTableModel(QObject *parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTABLEMODEL_H
|
||||
#ifndef CTABLEMODEL_H
|
||||
#define CTABLEMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
@ -45,7 +45,8 @@ FORMS += \
|
||||
LIBS += \
|
||||
-lpub_utility_api \
|
||||
-llog4cplus \
|
||||
-lpub_logger_api
|
||||
-lpub_logger_api \
|
||||
-lpub_widget
|
||||
|
||||
COMMON_PRI=$$PWD/../../../common.pri
|
||||
exists($$COMMON_PRI) {
|
||||
|
||||
@ -1,17 +1,46 @@
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
#include "common/QtAppGlobalSet.h"
|
||||
#include "CIconActDialog.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
kbd_common::doQtAppGlobalSet();
|
||||
iot_common::doQtAppGlobalSet();
|
||||
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
QTextCodec::setCodecForLocale(codec);
|
||||
|
||||
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;
|
||||
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_logger_api/logger.h"
|
||||
#include <QDir>
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
CJsonOpt::CJsonOpt()
|
||||
{
|
||||
std::string currentPath = kbd_public::CFileUtil::getCurModuleDir();
|
||||
std::string currentPath = iot_public::CFileUtil::getCurModuleDir();
|
||||
QDir dir(QString::fromStdString(currentPath));
|
||||
dir.cdUp();
|
||||
dir.cdUp();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CLineEditWithBt.h"
|
||||
#include "CLineEditWithBt.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QEvent>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CLINEEDITWITHBT_H
|
||||
#ifndef CLINEEDITWITHBT_H
|
||||
#define CLINEEDITWITHBT_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CNavigationDialog.h"
|
||||
#include "CNavigationDialog.h"
|
||||
#include "ui_CNavigationDialog.h"
|
||||
#include "CTreeItemDelegate.h"
|
||||
#include "public/pub_utility_api/FileUtil.h"
|
||||
@ -13,10 +13,13 @@
|
||||
const int Item_Role = Qt::UserRole + 1;
|
||||
|
||||
CNavigationDialog::CNavigationDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
CustomUiMainWindow(parent),
|
||||
ui(new Ui::CNavigationDialog),
|
||||
m_itemIndex(0)
|
||||
{
|
||||
setWindowTitle(tr("导航栏配置工具"));
|
||||
CustomUiMainWindow::setAutoLayout(true);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
initialize();
|
||||
@ -71,7 +74,7 @@ void CNavigationDialog::initialize()
|
||||
CTreeItemDelegate *boxDelegate2 = new CTreeItemDelegate(this, CTreeItemDelegate::ComboBox);
|
||||
boxDelegate2->setComboMap(m_mapType);
|
||||
|
||||
std::string currentPath = kbd_public::CFileUtil::getCurModuleDir();
|
||||
std::string currentPath = iot_public::CFileUtil::getCurModuleDir();
|
||||
QDir dir(QString::fromStdString(currentPath));
|
||||
dir.cdUp();
|
||||
dir.cdUp();
|
||||
@ -568,12 +571,12 @@ void CNavigationDialog::onConfirmClicked()
|
||||
QMessageBox::information(this, tr("提示"), tr("保存失败!"), QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
|
||||
}
|
||||
|
||||
void CNavigationDialog::onCancelClicked()
|
||||
{
|
||||
reject();
|
||||
|
||||
}
|
||||
|
||||
void CNavigationDialog::onExport()
|
||||
@ -783,7 +786,7 @@ QMap<int, QString> CNavigationDialog::makePathMap()
|
||||
{
|
||||
QMap<int, QString> fileMap;
|
||||
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(LOAD_WEBURL, picDir.path());
|
||||
fileMap.insert(EXTERN_PRO, QString::fromStdString(exePath));
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#ifndef CNAVIGATIONDIALOG_H
|
||||
#ifndef CNAVIGATIONDIALOG_H
|
||||
#define CNAVIGATIONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
||||
#include "model_excel/xlsx/xlsxdocument.h"
|
||||
#include "pub_widget/CustomMainWindow.h"
|
||||
|
||||
namespace Ui {
|
||||
class CNavigationDialog;
|
||||
@ -12,7 +12,7 @@ class CNavigationDialog;
|
||||
extern const int Item_Role; //< 节点数-仅导入使用
|
||||
|
||||
class QTreeWidgetItem;
|
||||
class CNavigationDialog : public QDialog
|
||||
class CNavigationDialog : public CustomUiMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@ -1,42 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CNavigationDialog</class>
|
||||
<widget class="QDialog" name="CNavigationDialog">
|
||||
<widget class="QMainWindow" name="CNavigationDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1087</width>
|
||||
<height>673</height>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>导航栏配置工具</string>
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</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>
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
@ -275,6 +264,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTreeItemDelegate.h"
|
||||
#include "CTreeItemDelegate.h"
|
||||
#include "CLineEditWithBt.h"
|
||||
#include "gui/GraphTool/NavigationApi/CJsonOpt.h"
|
||||
#include <QComboBox>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTREEITEMDELEGATE_H
|
||||
#ifndef CTREEITEMDELEGATE_H
|
||||
#define CTREEITEMDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTreeWidget.h"
|
||||
#include "CTreeWidget.h"
|
||||
#include <QMouseEvent>
|
||||
|
||||
CTreeWidget::CTreeWidget(QWidget *parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTREEWIDGET_H
|
||||
#ifndef CTREEWIDGET_H
|
||||
#define CTREEWIDGET_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
|
||||
@ -45,7 +45,8 @@ LIBS += \
|
||||
-lpub_logger_api \
|
||||
-lpub_utility_api \
|
||||
-lmodel_excel \
|
||||
-lNavigationApi
|
||||
-lNavigationApi \
|
||||
-lpub_widget
|
||||
|
||||
COMMON_PRI=$$PWD/../../../common.pri
|
||||
exists($$COMMON_PRI) {
|
||||
|
||||
@ -1,13 +1,41 @@
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include "common/QtAppGlobalSet.h"
|
||||
#include "CNavigationDialog.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
kbd_common::doQtAppGlobalSet();
|
||||
iot_common::doQtAppGlobalSet();
|
||||
|
||||
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;
|
||||
w.show();
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CConfirmDialog.h"
|
||||
#include "CConfirmDialog.h"
|
||||
#include "ui_CConfirmDialog.h"
|
||||
|
||||
CConfirmDialog::CConfirmDialog(QWidget *parent) :
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CCONFIRMDIALOG_H
|
||||
#ifndef CCONFIRMDIALOG_H
|
||||
#define CCONFIRMDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
@ -9,7 +9,7 @@ namespace Ui {
|
||||
class CConfirmDialog;
|
||||
}
|
||||
|
||||
using namespace kbd_sys;
|
||||
using namespace iot_sys;
|
||||
class CConfirmDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CFileSyncDialog.h"
|
||||
#include "CFileSyncDialog.h"
|
||||
#include "ui_CFileSyncDialog.h"
|
||||
#include "CConfirmDialog.h"
|
||||
#include "../include/public/pub_utility_api/I18N.h"
|
||||
@ -18,7 +18,7 @@ CFileSyncDialog::CFileSyncDialog(QDialog *parent) :
|
||||
{
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf8"));
|
||||
|
||||
if(kbd_public::getCurLanguage() == "en")
|
||||
if(iot_public::getCurLanguage() == "en")
|
||||
{
|
||||
QTranslator * sysTranslator = new QTranslator(this);
|
||||
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)
|
||||
{
|
||||
QVector<kbd_sys::stFileStatus> vecFileStatus;
|
||||
QVector<iot_sys::stFileStatus> vecFileStatus;
|
||||
|
||||
QStringList list;
|
||||
list.append(path);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CFILESYNCDIALOG_H
|
||||
#ifndef CFILESYNCDIALOG_H
|
||||
#define CFILESYNCDIALOG_H
|
||||
|
||||
#include "../../include/sys/sys_svn_file_sync_api/CSysFileSyncApi.h"
|
||||
@ -26,7 +26,7 @@ struct stSelectedPath
|
||||
QStringList path;
|
||||
};
|
||||
|
||||
using namespace kbd_sys;
|
||||
using namespace iot_sys;
|
||||
class CFileSyncDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include "common/QtAppGlobalSet.h"
|
||||
#include "CFileSyncDialog.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
kbd_common::doQtAppGlobalSet();
|
||||
iot_common::doQtAppGlobalSet();
|
||||
|
||||
QApplication a(argc, argv);
|
||||
CFileSyncDialog w;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user