[ref]同步711
This commit is contained in:
parent
5f3b48a88a
commit
6ce9a4aa71
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -61,7 +61,7 @@ LIBS += -lpub_logger_api \
|
|||||||
-lsys_file_sync_api \
|
-lsys_file_sync_api \
|
||||||
-lsys_login_api
|
-lsys_login_api
|
||||||
|
|
||||||
|
LIBS += -lpub_widget
|
||||||
|
|
||||||
include($$PWD/../../idl_files/idl_files.pri)
|
include($$PWD/../../idl_files/idl_files.pri)
|
||||||
|
|
||||||
|
|||||||
@ -3,10 +3,10 @@
|
|||||||
#include "pub_sysinfo_api/SysInfoApi.h"
|
#include "pub_sysinfo_api/SysInfoApi.h"
|
||||||
#include "pub_utility_api/FileUtil.h"
|
#include "pub_utility_api/FileUtil.h"
|
||||||
#include "../include/sys/sys_login_api/CLoginDlg.h"
|
#include "../include/sys/sys_login_api/CLoginDlg.h"
|
||||||
|
#include "pub_utility_api/FileStyle.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
@ -14,14 +14,16 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include "treefilterfun.h"
|
#include "treefilterfun.h"
|
||||||
#include "treeupdatefun.h"
|
#include "treeupdatefun.h"
|
||||||
|
#include "pub_widget/MessageBox.h"
|
||||||
|
|
||||||
using namespace iot_public;
|
using namespace iot_public;
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
CustomUiMainWindow(parent),
|
||||||
ui(new Ui::MainWindow)
|
ui(new Ui::MainWindow)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowIcon(QIcon(":/FileSync.ico"));
|
setWindowIcon(QIcon(":/FileSync.ico"));
|
||||||
|
setWindowTitle(tr("文件同步"));
|
||||||
|
|
||||||
m_updeteToLocalBtn = ui->pushButton_2;
|
m_updeteToLocalBtn = ui->pushButton_2;
|
||||||
m_broadcastToDomainBtn = ui->pushButton_3;
|
m_broadcastToDomainBtn = ui->pushButton_3;
|
||||||
@ -141,6 +143,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
slot_hostCbmCurrentIndexChanged(m_hostCbm->currentIndex());
|
slot_hostCbmCurrentIndexChanged(m_hostCbm->currentIndex());
|
||||||
|
|
||||||
slot_rootPathBtnClicked();
|
slot_rootPathBtnClicked();
|
||||||
|
|
||||||
|
initStyle();
|
||||||
|
setTitleWidget(ui->widget_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@ -240,6 +245,27 @@ void MainWindow::updateViewShow()
|
|||||||
m_filterEndTimeEdit->setEnabled(isEnable);
|
m_filterEndTimeEdit->setEnabled(isEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::initStyle()
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!qss.isEmpty())
|
||||||
|
{
|
||||||
|
setStyleSheet(qss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::slot_refeshBtnClicked()
|
void MainWindow::slot_refeshBtnClicked()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -391,8 +417,8 @@ void MainWindow::slot_broadcastToDomainBtnClicked()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = QMessageBox::question(this, "警告", "再次确定全域同步所选文件,是否同步?");
|
int ret = N_MessageBox::question(this, "警告", "再次确定全域同步所选文件,是否同步?");
|
||||||
if (ret != QMessageBox::Yes)
|
if (ret != N_MessageBox::Ok)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -535,8 +561,8 @@ void MainWindow::slot_clearTaskAction(bool)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = QMessageBox::question(this, "警告", QString("确定清理全域目录,清理多余文件?目录名[%1]").arg(pathFile));
|
int ret = N_MessageBox::question(this, "警告", QString("确定清理全域目录,清理多余文件?目录名[%1]").arg(pathFile));
|
||||||
if (ret != QMessageBox::Yes)
|
if (ret != N_MessageBox::Ok)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -590,8 +616,8 @@ void MainWindow::slot_comitModify(bool)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = QMessageBox::question(this, "警告", QString("确定提交修改文件?文件名[%1]").arg(pathFile));
|
int ret = N_MessageBox::question(this, "警告", QString("确定提交修改文件?文件名[%1]").arg(pathFile));
|
||||||
if (ret != QMessageBox::Yes)
|
if (ret != N_MessageBox::Ok)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -631,8 +657,8 @@ void MainWindow::slot_comitDel(bool)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = QMessageBox::question(this, "警告", QString("确定提交删除文件?文件名[%1]").arg(pathFile));
|
int ret = N_MessageBox::question(this, "警告", QString("确定提交删除文件?文件名[%1]").arg(pathFile));
|
||||||
if (ret != QMessageBox::Yes)
|
if (ret != N_MessageBox::Ok)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -856,8 +882,8 @@ bool MainWindow::recvExeTaskReuslt()
|
|||||||
|
|
||||||
bool MainWindow::removePathFile(const QString& pathFile)
|
bool MainWindow::removePathFile(const QString& pathFile)
|
||||||
{
|
{
|
||||||
int ret = QMessageBox::question(this, "警告", QString("是否删除本地文件?"));
|
int ret = N_MessageBox::question(this, "警告", QString("是否删除本地文件?"));
|
||||||
if (ret != QMessageBox::Yes)
|
if (ret != N_MessageBox::Ok)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "msgtrans.h"
|
#include "msgtrans.h"
|
||||||
#include "treefilterfun.h"
|
#include "treefilterfun.h"
|
||||||
|
#include "pub_widget/CustomMainWindow.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
@ -23,7 +24,7 @@ using namespace iot_public;
|
|||||||
const static int TIME_OUT_DEF = 30;
|
const static int TIME_OUT_DEF = 30;
|
||||||
|
|
||||||
typedef QList<QTreeWidgetItem*> QTreeWidgetItemList;
|
typedef QList<QTreeWidgetItem*> QTreeWidgetItemList;
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public CustomUiMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -41,6 +42,8 @@ private:
|
|||||||
|
|
||||||
void updateViewShow();
|
void updateViewShow();
|
||||||
|
|
||||||
|
void initStyle();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slot_refeshBtnClicked();
|
void slot_refeshBtnClicked();
|
||||||
void slot_rootPathBtnClicked();
|
void slot_rootPathBtnClicked();
|
||||||
|
|||||||
@ -14,7 +14,28 @@
|
|||||||
<string>文件同步助手</string>
|
<string>文件同步助手</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QWidget" name="widget_2" native="true"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="WorkFrame" name="widget_4" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<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>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -321,8 +342,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>WorkFrame</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>pub_widget/WorkFrame.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user