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