ledok
This commit is contained in:
parent
548a1e4e88
commit
7f44fd1ca5
|
@ -259,7 +259,7 @@ include(./xlsx/qtxlsx.pri)
|
|||
include(./QSimpleUpdater/QSimpleUpdater.pri)
|
||||
|
||||
|
||||
copy.files += $$quote(y50 param)
|
||||
copydir.files += $$quote(y50 param)
|
||||
|
||||
win32 {
|
||||
INCLUDEPATH += $$PWD/ffmpeg/include
|
||||
|
@ -272,15 +272,17 @@ LIBS += -L$$PWD/ffmpeg/lib/\
|
|||
-lswresample \
|
||||
-lswscale
|
||||
|
||||
CONFIG += file_copies
|
||||
copy.path = $$OUT_PWD
|
||||
copydir.path = $$OUT_PWD
|
||||
copy.files += $$files(ffmpeg/bin/*.dll)
|
||||
copy.files += ffmpeg/bin/ffmpeg.exe
|
||||
copy.files += 7z/7z.dll
|
||||
copy.files += 7z/7z.exe
|
||||
# for https requests
|
||||
copy.files += $$files(OpenSSL/*.dll)
|
||||
CONFIG += file_copies
|
||||
COPIES += copy
|
||||
COPIES += copydir
|
||||
}
|
||||
osx {
|
||||
INCLUDEPATH += $$PWD/ffmpeg-mac/include
|
||||
|
@ -293,6 +295,6 @@ LIBS += -L$$PWD/ffmpeg-mac/lib/\
|
|||
-lswresample \
|
||||
-lswscale
|
||||
|
||||
copy.path = Contents/MacOS
|
||||
QMAKE_BUNDLE_DATA += copy
|
||||
copydir.path = Contents/MacOS
|
||||
QMAKE_BUNDLE_DATA += copydir
|
||||
}
|
||||
|
|
|
@ -48,7 +48,8 @@ CtrlNetworkPanel::CtrlNetworkPanel(QWidget *parent) : QWidget(parent) {
|
|||
hhh->addWidget(labelIpAddress = new QLabel);
|
||||
|
||||
fdIP = new QLineEdit;
|
||||
fdIP->setInputMask("000.000.000.000");
|
||||
fdIP->setInputMask("000.000.000.000;_");
|
||||
fdIP->setAlignment(Qt::AlignCenter);
|
||||
fdIP->setFixedWidth(160);
|
||||
hhh->addWidget(fdIP);
|
||||
|
||||
|
@ -57,7 +58,8 @@ CtrlNetworkPanel::CtrlNetworkPanel(QWidget *parent) : QWidget(parent) {
|
|||
hhh->addWidget(labelMaskAddress = new QLabel);
|
||||
|
||||
fdMask = new QLineEdit;
|
||||
fdMask->setInputMask("000.000.000.000");
|
||||
fdMask->setInputMask("000.000.000.000;_");
|
||||
fdMask->setAlignment(Qt::AlignCenter);
|
||||
fdMask->setFixedWidth(160);
|
||||
hhh->addWidget(fdMask);
|
||||
|
||||
|
@ -66,7 +68,8 @@ CtrlNetworkPanel::CtrlNetworkPanel(QWidget *parent) : QWidget(parent) {
|
|||
hhh->addWidget(labelGateway = new QLabel);
|
||||
|
||||
fdGateWay = new QLineEdit;
|
||||
fdGateWay->setInputMask("000.000.000.000");
|
||||
fdGateWay->setInputMask("000.000.000.000;_");
|
||||
fdGateWay->setAlignment(Qt::AlignCenter);
|
||||
fdGateWay->setFixedWidth(160);
|
||||
hhh->addWidget(fdGateWay);
|
||||
|
||||
|
@ -75,7 +78,8 @@ CtrlNetworkPanel::CtrlNetworkPanel(QWidget *parent) : QWidget(parent) {
|
|||
hhh->addWidget(labelDnsAddress = new QLabel);
|
||||
|
||||
fdDns = new QLineEdit;
|
||||
fdDns->setInputMask("000.000.000.000");
|
||||
fdDns->setInputMask("000.000.000.000;_");
|
||||
fdDns->setAlignment(Qt::AlignCenter);
|
||||
fdDns->setFixedWidth(160);
|
||||
hhh->addWidget(fdDns);
|
||||
}
|
||||
|
@ -94,32 +98,32 @@ CtrlNetworkPanel::CtrlNetworkPanel(QWidget *parent) : QWidget(parent) {
|
|||
QMessageBox::information(gMainWin, tr("Tip"), tr("NoSelectedController"));
|
||||
return;
|
||||
}
|
||||
QString ip = fdIP->text().trimmed();
|
||||
QString mask = fdMask->text().trimmed();
|
||||
QString gateWay = fdGateWay->text().trimmed();
|
||||
QString dns = fdDns->text().trimmed();
|
||||
QString ip = fdIP->text();
|
||||
QString mask = fdMask->text();
|
||||
QString gateWay = fdGateWay->text();
|
||||
QString dns = fdDns->text();
|
||||
if(fdDhcp->isChecked()) {
|
||||
if(ip.isEmpty()) ip = "0.255.255.255";
|
||||
if(mask.isEmpty()) mask = "0.255.255.255";
|
||||
if(gateWay.isEmpty()) gateWay = "0.255.255.255";
|
||||
if(dns.isEmpty()) dns = "0.255.255.255";
|
||||
if(ip=="...") ip = "0.255.255.255";
|
||||
if(mask=="...") mask = "0.255.255.255";
|
||||
if(gateWay=="...") gateWay = "0.255.255.255";
|
||||
if(dns=="...") dns = "0.255.255.255";
|
||||
} else {
|
||||
if(ip.isEmpty()) {
|
||||
if(ip=="...") {
|
||||
QMessageBox::warning(gMainWin, tr("Attention"), tr("Please input IP address!"));
|
||||
fdIP->setFocus();
|
||||
return;
|
||||
}
|
||||
if(mask.isEmpty()) {
|
||||
if(mask=="...") {
|
||||
QMessageBox::warning(gMainWin, tr("Attention"), tr("Please input Mask address!"));
|
||||
fdMask->setFocus();
|
||||
return;
|
||||
}
|
||||
if(gateWay.isEmpty()) {
|
||||
if(gateWay=="...") {
|
||||
QMessageBox::warning(gMainWin, tr("Attention"), tr("Please input Gateway address!"));
|
||||
fdGateWay->setFocus();
|
||||
return;
|
||||
}
|
||||
if(dns.isEmpty()) {
|
||||
if(dns=="...") {
|
||||
QMessageBox::warning(gMainWin, tr("Attention"), tr("Please input DNS address!"));
|
||||
fdDns->setFocus();
|
||||
return;
|
||||
|
|
|
@ -116,10 +116,6 @@ void PageEditor::keyReleaseEvent(QKeyEvent *event) {
|
|||
default:break;
|
||||
}
|
||||
}
|
||||
void PageEditor::wheelEvent(QWheelEvent *e) {
|
||||
qDebug()<<"angleDelta"<<e->angleDelta().y()<<"pixelDelta"<<e->pixelDelta().y();
|
||||
onScale(e->angleDelta().y() / 2);
|
||||
}
|
||||
|
||||
QList<EBase*> PageEditor::sortedEles() {
|
||||
QList<EBase*> eles;
|
||||
|
|
|
@ -12,16 +12,13 @@ public:
|
|||
explicit PageEditor(QWidget *parent = nullptr);
|
||||
|
||||
virtual void keyReleaseEvent(QKeyEvent *event) override;
|
||||
virtual void wheelEvent(QWheelEvent*event) override;
|
||||
|
||||
QList<EBase*> sortedEles();
|
||||
EBase* getElementSelected();
|
||||
|
||||
QGraphicsView *graphicsView;
|
||||
QLabel *fdScale;
|
||||
int curScale = 100;
|
||||
signals:
|
||||
void scaleChanged(int);
|
||||
int curScale{100};
|
||||
|
||||
public slots:
|
||||
void onScale(int);
|
||||
|
|
Loading…
Reference in New Issue
Block a user