[ref]同步711
This commit is contained in:
parent
2f0cba37f1
commit
17f18f4135
@ -19,6 +19,8 @@ TARGET = camera_statistics
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
RC_ICONS = resource/preset_config.ico
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
ccameraorientation.cpp \
|
||||
@ -42,6 +44,7 @@ LIBS += -llog4cplus \
|
||||
-ldb_sysinfo_api \
|
||||
-lpub_utility_api \
|
||||
-lOnvifLib \
|
||||
-lpub_widget
|
||||
|
||||
win32-msvc* {
|
||||
|
||||
@ -53,7 +56,7 @@ CONFIG(release, debug|release) {
|
||||
}
|
||||
}
|
||||
|
||||
linux-g++*{
|
||||
linux-*g++*{
|
||||
LIBS += -lQtAV -lQtAVWidgets -lssl -lcrypto -lXext
|
||||
}
|
||||
|
||||
|
||||
@ -8,11 +8,12 @@ using namespace iot_public;
|
||||
using namespace iot_dbms;
|
||||
using namespace QtAV;
|
||||
|
||||
|
||||
CCameraOrientation::CCameraOrientation(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
CustomUiDialog(parent,false),
|
||||
ui(new Ui::CCameraOrientation)
|
||||
{
|
||||
setWindowTitle(tr("摄像头预置点配置"));
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
QtAV::setLogLevel(QtAV::LogAll); // 关闭qtav的日志
|
||||
@ -21,6 +22,8 @@ CCameraOrientation::CCameraOrientation(QWidget *parent) :
|
||||
initDb();
|
||||
initUi();
|
||||
initConnect();
|
||||
|
||||
setAutoLayout(true);
|
||||
}
|
||||
|
||||
CCameraOrientation::~CCameraOrientation()
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#ifndef CCAMERAORIENTATION_H
|
||||
#define CCAMERAORIENTATION_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMessageBox>
|
||||
#include "db_api_ex/CDbApi.h"
|
||||
#include "pub_widget/CustomDialog.h"
|
||||
|
||||
#include "pub_logger_api/logger.h"
|
||||
#include "scamera.h"
|
||||
@ -20,7 +20,7 @@ namespace Ui {
|
||||
class CCameraOrientation;
|
||||
}
|
||||
|
||||
class CCameraOrientation : public QDialog
|
||||
class CCameraOrientation : public CustomUiDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@ -4,6 +4,35 @@
|
||||
#include "common/QtAppGlobalSet.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
#include "ccameraorientation.h"
|
||||
#include "pub_utility_api/FileStyle.h"
|
||||
|
||||
void loadStyle()
|
||||
{
|
||||
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("camera_statistics.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);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@ -13,8 +42,10 @@ int main(int argc, char *argv[])
|
||||
qputenv("QT_ANGLE_PLATFORM", "d3d11");
|
||||
|
||||
QApplication a(argc, argv);
|
||||
loadStyle();
|
||||
|
||||
a.setWindowIcon(QIcon(":/resource/preset_config.ico"));
|
||||
iot_public::StartLogSystem("PSCADA","camera_statistics");
|
||||
iot_public::StartLogSystem("tools","camera_statistics");
|
||||
|
||||
CCameraOrientation w( 0 );
|
||||
w.show();
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Loading…
x
Reference in New Issue
Block a user