Init
This commit is contained in:
parent
a4135d45d8
commit
1fee25a38c
120
Sh3.pro
Normal file
120
Sh3.pro
Normal file
@ -0,0 +1,120 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2016-08-31T18:05:21
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui network
|
||||
|
||||
TARGET = Sh3
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += main.cpp\
|
||||
widget.cpp \
|
||||
zerkus.cpp \
|
||||
vvodts.cpp \
|
||||
vvodsectugol.cpp \
|
||||
vvodsectotvet.cpp \
|
||||
vvodsectazim.cpp \
|
||||
vvodreper.cpp \
|
||||
vvodready.cpp \
|
||||
vvodms.cpp \
|
||||
vvodma.cpp \
|
||||
vvodkcu.cpp \
|
||||
vvoddko.cpp \
|
||||
vvodbk.cpp \
|
||||
vvodautozadef.cpp \
|
||||
texit.cpp \
|
||||
tempzar.cpp \
|
||||
showcrc.cpp \
|
||||
pushbuttonmod.cpp \
|
||||
ownadr.cpp \
|
||||
nastrel.cpp \
|
||||
meteosred.cpp \
|
||||
menubarmod.cpp \
|
||||
graphicsviewmod.cpp \
|
||||
graphicslineitem.cpp \
|
||||
graphicsarcitem.cpp \
|
||||
gktogk.cpp \
|
||||
gktogeo.cpp \
|
||||
geotogk.cpp \
|
||||
gag.cpp \
|
||||
errorsza.cpp \
|
||||
comboboxmod.cpp \
|
||||
checkboxmod.cpp \
|
||||
grairobject.cpp \
|
||||
vvod2z.cpp \
|
||||
table2z.cpp
|
||||
|
||||
HEADERS += widget.h \
|
||||
zerkus.h \
|
||||
vvodts.h \
|
||||
vvodsectugol.h \
|
||||
vvodsectotvet.h \
|
||||
vvodsectazim.h \
|
||||
vvodreper.h \
|
||||
vvodready.h \
|
||||
vvodms.h \
|
||||
vvodma.h \
|
||||
vvodkcu.h \
|
||||
vvoddko.h \
|
||||
vvodbk.h \
|
||||
vvodautozadef.h \
|
||||
texit.h \
|
||||
tempzar.h \
|
||||
showcrc.h \
|
||||
pushbuttonmod.h \
|
||||
ownadr.h \
|
||||
nastrel.h \
|
||||
meteosred.h \
|
||||
menubarmod.h \
|
||||
graphicsviewmod.h \
|
||||
graphicslineitem.h \
|
||||
graphicsarcitem.h \
|
||||
gktogk.h \
|
||||
gktogeo.h \
|
||||
geotogk.h \
|
||||
geo.h \
|
||||
gag.h \
|
||||
errorsza.h \
|
||||
comboboxmod.h \
|
||||
checkboxmod.h \
|
||||
grairobject.h \
|
||||
vvod2z.h \
|
||||
table2z.h
|
||||
|
||||
FORMS += widget.ui \
|
||||
zerkus.ui \
|
||||
vvodts.ui \
|
||||
vvodsectugol.ui \
|
||||
vvodsectotvet.ui \
|
||||
vvodsectazim.ui \
|
||||
vvodreper.ui \
|
||||
vvodready.ui \
|
||||
vvodms.ui \
|
||||
vvodma.ui \
|
||||
vvodkcu.ui \
|
||||
vvoddko.ui \
|
||||
vvodbk.ui \
|
||||
vvodautozadef.ui \
|
||||
texit.ui \
|
||||
tempzar.ui \
|
||||
showcrc.ui \
|
||||
ownadr.ui \
|
||||
nastrel.ui \
|
||||
meteosred.ui \
|
||||
gktogk.ui \
|
||||
gktogeo.ui \
|
||||
geotogk.ui \
|
||||
gag.ui \
|
||||
errorsza.ui \
|
||||
vvod2z.ui \
|
||||
table2z.ui
|
||||
|
||||
OTHER_FILES += \
|
||||
Sh3.pro
|
||||
|
||||
RESOURCES += \
|
||||
pics.qrc \
|
||||
table2z.qrc
|
31
checkboxmod.cpp
Normal file
31
checkboxmod.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "checkboxmod.h"
|
||||
#include <QKeyEvent>
|
||||
|
||||
checkboxmod::checkboxmod(QWidget *parent) :
|
||||
QCheckBox(parent)
|
||||
{
|
||||
F11disabled = false;
|
||||
}
|
||||
|
||||
void checkboxmod::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
|
||||
int c = e->key();
|
||||
|
||||
if ((c==Qt::Key_F11)&& !F11disabled)
|
||||
{
|
||||
this->animateClick();
|
||||
}
|
||||
|
||||
QCheckBox::keyPressEvent(e);
|
||||
}
|
||||
|
||||
bool checkboxmod::isF11disabled()
|
||||
{
|
||||
return F11disabled;
|
||||
}
|
||||
|
||||
void checkboxmod::setF11disabled(bool fl)
|
||||
{
|
||||
F11disabled = fl;
|
||||
}
|
25
checkboxmod.h
Normal file
25
checkboxmod.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef CHECKBOXMOD_H
|
||||
#define CHECKBOXMOD_H
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
class checkboxmod : public QCheckBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit checkboxmod(QWidget *parent = 0);
|
||||
bool isF11disabled();
|
||||
void setF11disabled(bool fl);
|
||||
int uid;
|
||||
|
||||
signals:
|
||||
void activate1(int);
|
||||
public slots:
|
||||
|
||||
private:
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
bool F11disabled;
|
||||
|
||||
};
|
||||
|
||||
#endif // CHECKBOXMOD_H
|
32
comboboxmod.cpp
Normal file
32
comboboxmod.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
#include "comboboxmod.h"
|
||||
|
||||
comboboxmod::comboboxmod(QWidget *parent) :
|
||||
QComboBox(parent)
|
||||
{
|
||||
uid =0;
|
||||
}
|
||||
|
||||
void comboboxmod::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
int c=e->key();
|
||||
bool fl = true;
|
||||
|
||||
if (e->modifiers() & Qt::AltModifier)
|
||||
{
|
||||
switch (c) {
|
||||
case 0x31:
|
||||
case 0x32:
|
||||
emit activate1(c);
|
||||
fl = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((uid==0x32)&&(c==Qt::Key_Right)) fl = false;
|
||||
if ((uid==0x32)&&(c==Qt::Key_Tab)) fl = false;
|
||||
|
||||
if (fl) QComboBox::keyPressEvent(e);
|
||||
}
|
23
comboboxmod.h
Normal file
23
comboboxmod.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef COMBOBOXMOD_H
|
||||
#define COMBOBOXMOD_H
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QKeyEvent>
|
||||
|
||||
class comboboxmod : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit comboboxmod(QWidget *parent = 0);
|
||||
int uid;
|
||||
signals:
|
||||
void activate1(int);
|
||||
public slots:
|
||||
|
||||
|
||||
private:
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
|
||||
};
|
||||
|
||||
#endif // COMBOBOXMOD_H
|
104
errorsza.cpp
Normal file
104
errorsza.cpp
Normal file
@ -0,0 +1,104 @@
|
||||
#include "errorsza.h"
|
||||
#include "ui_errorsza.h"
|
||||
|
||||
errorsZA::errorsZA(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::errorsZA)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
int i=0;
|
||||
for (i=0;i<9;i++)
|
||||
{
|
||||
errZAhor[i] = (((Widget*)parent)->errZAgor[i]);
|
||||
}
|
||||
for (i=0; i<7; i++)
|
||||
{
|
||||
errZAver[i] = (((Widget*)parent)->errZAver[i]);
|
||||
}
|
||||
errZAdB = ((Widget*)parent)->errZAdB;
|
||||
|
||||
ui->lineEdit->setText(QString::number(errZAhor[0]));
|
||||
ui->lineEdit_2->setText(QString::number(errZAhor[1]));
|
||||
ui->lineEdit_3->setText(QString::number(errZAhor[2]));
|
||||
ui->lineEdit_4->setText(QString::number(errZAhor[3]));
|
||||
ui->lineEdit_5->setText(QString::number(errZAhor[4]));
|
||||
ui->lineEdit_6->setText(QString::number(errZAhor[5]));
|
||||
ui->lineEdit_7->setText(QString::number(errZAhor[6]));
|
||||
ui->lineEdit_8->setText(QString::number(errZAhor[7]));
|
||||
ui->lineEdit_9->setText(QString::number(errZAhor[8]));
|
||||
|
||||
ui->lineEdit_10->setText(QString::number(errZAver[0]));
|
||||
ui->lineEdit_11->setText(QString::number(errZAver[1]));
|
||||
ui->lineEdit_12->setText(QString::number(errZAver[2]));
|
||||
ui->lineEdit_13->setText(QString::number(errZAver[3]));
|
||||
ui->lineEdit_14->setText(QString::number(errZAver[4]));
|
||||
ui->lineEdit_15->setText(QString::number(errZAver[5]));
|
||||
ui->lineEdit_16->setText(QString::number(errZAver[6]));
|
||||
|
||||
int du = errZAdB / 100;
|
||||
ui->lineEdit_17->setText(QString::number(du));
|
||||
du = errZAdB % 100;
|
||||
ui->lineEdit_18->setText(QString::number(du));
|
||||
|
||||
}
|
||||
|
||||
errorsZA::~errorsZA()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void errorsZA::on_pushButton_2_clicked()
|
||||
{
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
void errorsZA::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void errorsZA::on_pushButton_clicked()
|
||||
{
|
||||
int i;
|
||||
|
||||
errZAhor[0] = ui->lineEdit->text().toInt();
|
||||
errZAhor[1] = ui->lineEdit_2->text().toInt();
|
||||
errZAhor[2] = ui->lineEdit_3->text().toInt();
|
||||
errZAhor[3] = ui->lineEdit_4->text().toInt();
|
||||
errZAhor[4] = ui->lineEdit_5->text().toInt();
|
||||
errZAhor[5] = ui->lineEdit_6->text().toInt();
|
||||
errZAhor[6] = ui->lineEdit_7->text().toInt();
|
||||
errZAhor[7] = ui->lineEdit_8->text().toInt();
|
||||
errZAhor[8] = ui->lineEdit_9->text().toInt();
|
||||
|
||||
errZAver[0] = ui->lineEdit_10->text().toInt();
|
||||
errZAver[1] = ui->lineEdit_11->text().toInt();
|
||||
errZAver[2] = ui->lineEdit_12->text().toInt();
|
||||
errZAver[3] = ui->lineEdit_13->text().toInt();
|
||||
errZAver[4] = ui->lineEdit_14->text().toInt();
|
||||
errZAver[5] = ui->lineEdit_15->text().toInt();
|
||||
errZAver[6] = ui->lineEdit_16->text().toInt();
|
||||
|
||||
errZAdB = ui->lineEdit_17->text().toInt()*100 + ui->lineEdit_18->text().toInt();
|
||||
|
||||
|
||||
((Widget*)parent())->errZAdB = errZAdB;
|
||||
|
||||
for (i=0; i<9; i++)
|
||||
{
|
||||
((Widget*)parent())->errZAgor[i] = errZAhor[i];
|
||||
}
|
||||
for (i=0;i<7;i++)
|
||||
{
|
||||
((Widget*)parent())->errZAver[i] = errZAver[i];
|
||||
}
|
||||
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
32
errorsza.h
Normal file
32
errorsza.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef ERRORSZA_H
|
||||
#define ERRORSZA_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class errorsZA;
|
||||
}
|
||||
|
||||
class errorsZA : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit errorsZA(QWidget *parent = 0);
|
||||
~errorsZA();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
Ui::errorsZA *ui;
|
||||
int errZAhor[9];
|
||||
int errZAver[7];
|
||||
int errZAdB;
|
||||
};
|
||||
|
||||
#endif // ERRORSZA_H
|
395
errorsza.ui
Normal file
395
errorsza.ui
Normal file
@ -0,0 +1,395 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>errorsZA</class>
|
||||
<widget class="QDialog" name="errorsZA">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>322</width>
|
||||
<height>363</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод ошибки ЗА</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>141</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Ошибка Δ Q (мин.)</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>40</y>
|
||||
<width>111</width>
|
||||
<height>231</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>23</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>0°</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>45°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>90°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>135°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>180°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>225°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>270°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>315°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>360°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_7">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_8">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_9">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>20</y>
|
||||
<width>131</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Ошибка Δ Ф (мин.)</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>40</y>
|
||||
<width>101</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>23</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>-5°</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_10">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>10°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_11">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>25°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_12">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>40°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_13">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>55°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_14">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>70°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_15">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>85°</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_16">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>250</y>
|
||||
<width>131</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Поправка Δ β</string>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit_17">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_18">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>20</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>20</y>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>320</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>320</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
67
gag.cpp
Normal file
67
gag.cpp
Normal file
@ -0,0 +1,67 @@
|
||||
#include "gag.h"
|
||||
#include "ui_gag.h"
|
||||
|
||||
GAG::GAG(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::GAG)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
Widget *w = (Widget*)parent;
|
||||
w->changeOpenWidget(this);
|
||||
|
||||
|
||||
ui->comboBox->setCurrentIndex(w->rezhimGAG);
|
||||
ui->lineEdit->setText(QString::number(w->GAGdu));
|
||||
ui->lineEdit_2->setText(QString::number(w->GAGmdu));
|
||||
ui->lineEdit_3->setText(QString::number(w->GAGdu0));
|
||||
ui->lineEdit_4->setText(QString::number(w->GAGmdu0));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
GAG::~GAG()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void GAG::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GAG::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void GAG::on_pushButton_clicked()
|
||||
{
|
||||
Widget *w = (Widget*)parent();
|
||||
int i = ui->comboBox->currentIndex();
|
||||
w->setRezhimGAG(i);
|
||||
|
||||
|
||||
if (i!=2)
|
||||
{
|
||||
|
||||
|
||||
w->GAGdu = ui->lineEdit->text().toInt();
|
||||
w->GAGmdu = ui->lineEdit_2->text().toInt();
|
||||
w->GAGdu0 = ui->lineEdit_3->text().toInt();
|
||||
w->GAGmdu0 = ui->lineEdit_4->text().toInt();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
w->GAGdu = 0;
|
||||
w->GAGmdu = 0;
|
||||
w->GAGdu0 = 0;
|
||||
w->GAGmdu0 = 0;
|
||||
}
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
28
gag.h
Normal file
28
gag.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef GAG_H
|
||||
#define GAG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class GAG;
|
||||
}
|
||||
|
||||
class GAG : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GAG(QWidget *parent = 0);
|
||||
~GAG();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::GAG *ui;
|
||||
};
|
||||
|
||||
#endif // GAG_H
|
262
gag.ui
Normal file
262
gag.ui
Normal file
@ -0,0 +1,262 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GAG</class>
|
||||
<widget class="QDialog" name="GAG">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>227</width>
|
||||
<height>207</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Режимы стабилизирования</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>211</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>15</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Режим ГАГ</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="comboboxmod" name="comboBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>10</y>
|
||||
<width>91</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ГАГдв</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Квв</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0гаг</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ГАГст</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>23</x>
|
||||
<y>59</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>К исх</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> гаг</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>46</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> исх</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>137</x>
|
||||
<y>63</y>
|
||||
<width>46</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>60</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>60</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>97</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>97</y>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>137</x>
|
||||
<y>100</y>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>22</x>
|
||||
<y>97</y>
|
||||
<width>46</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>K</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>170</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>170</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>comboboxmod</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header location="global">comboboxmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>pushButton</tabstop>
|
||||
<tabstop>pushButton_2</tabstop>
|
||||
<tabstop>comboBox</tabstop>
|
||||
<tabstop>lineEdit</tabstop>
|
||||
<tabstop>lineEdit_2</tabstop>
|
||||
<tabstop>lineEdit_3</tabstop>
|
||||
<tabstop>lineEdit_4</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
42
geo.h
Normal file
42
geo.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef GEO_H
|
||||
#define GEO_H
|
||||
|
||||
#include <cmath>
|
||||
|
||||
struct T_geoPoint
|
||||
{
|
||||
int nZone;
|
||||
bool south;
|
||||
int x;
|
||||
int y;
|
||||
int h;
|
||||
};
|
||||
|
||||
struct T_metAv
|
||||
{
|
||||
int temp;
|
||||
int wind;
|
||||
int azim;
|
||||
int pressure;
|
||||
};
|
||||
|
||||
struct T_sectOtv
|
||||
{
|
||||
qreal left;
|
||||
qreal right;
|
||||
qreal height;
|
||||
qreal bottom;
|
||||
};
|
||||
|
||||
//struct T_ugolDU
|
||||
//{
|
||||
// int DU;
|
||||
// int mDU;
|
||||
//};
|
||||
|
||||
//T_ugolDU deg_v_DU(qreal deg)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
#endif // GEO_H
|
94
geotogk.cpp
Normal file
94
geotogk.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
#include "geotogk.h"
|
||||
#include "ui_geotogk.h"
|
||||
|
||||
GEOtoGK::GEOtoGK(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::GEOtoGK)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
}
|
||||
|
||||
GEOtoGK::~GEOtoGK()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
void GEOtoGK::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GEOtoGK::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void GEOtoGK::on_pushButton_clicked()
|
||||
{
|
||||
int nZone, b1, b2, b3, l1, l2, l3;
|
||||
bool south;
|
||||
|
||||
int XL, YL;
|
||||
|
||||
double CA2=5333.5419;
|
||||
double CA4=4.84339;
|
||||
double CA6=0.007622;
|
||||
double A1,A2,A3,B1,B2,B3,C1,C2,C3,D1,D2,D3,
|
||||
E,EL,FI,L0,TGE,THP,P;
|
||||
|
||||
|
||||
|
||||
nZone = ui->lineEdit->text().toInt();
|
||||
south = ui->checkBox->isChecked();
|
||||
b1 = ui->lineEdit_2->text().toInt();
|
||||
b2 = ui->lineEdit_3->text().toInt();
|
||||
b3 = ui->lineEdit_4->text().toInt();
|
||||
l1 = ui->lineEdit_5->text().toInt();
|
||||
l2 = ui->lineEdit_6->text().toInt();
|
||||
l3 = ui->lineEdit_7->text().toInt();
|
||||
|
||||
|
||||
|
||||
// ðàñ÷åò
|
||||
|
||||
|
||||
B = (((b3/60)+b2) /60 + b1)/180*M_PI;
|
||||
if (south) B=-B;
|
||||
L = (((l3/60)+l2)/60+l1)/180*M_PI;
|
||||
|
||||
L0=double(nZone)*6.0-3.0;
|
||||
L0=L0*M_PI/180.0;
|
||||
EL=L-L0;
|
||||
FI=(2624.0*sin(B)*sin(B)+372834.0)*sin(B)*sin(B);
|
||||
FI=B-((FI+66934216.0)*sin(B)*cos(B)*0.0000000001);
|
||||
TGE=tan(FI)/cos(EL);
|
||||
E=atan(TGE);
|
||||
THP=cos(FI)*sin(EL);
|
||||
P=0.5*log((1.0+THP)/(1.0-THP));
|
||||
A1=sin(2.0*E);
|
||||
B1=cos(2.0*E);
|
||||
C1=sinh(2.0*P);
|
||||
D1=cosh(2.0*P);
|
||||
A2=2.0*A1*B1;
|
||||
B2=1.0-2.0*A1*A1;
|
||||
C2=2.0*C1*D1;
|
||||
D2=1.0+2.0*C1*C1;
|
||||
A3=A1*B2+A2*B1;
|
||||
B3=B1*B2-A1*A2;
|
||||
C3=C1*D2+C2*D1;
|
||||
D3=D1*D2+C1*C2;
|
||||
|
||||
XL = 6367558.497*E+CA2*A1*D1+CA4*A2*D2+CA6*A3*D3;
|
||||
if (XL<0) XL=-XL;
|
||||
|
||||
YL = 6367558.497*P+CA2*B1*C1+CA4*B2*C2+CA6*B3*C3 + 500000.0;
|
||||
|
||||
ui->lineEdit_8->setText(QString::number(XL));
|
||||
ui->lineEdit_9->setText(QString::number(YL));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
31
geotogk.h
Normal file
31
geotogk.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef GEOTOGK_H
|
||||
#define GEOTOGK_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
#include "geo.h"
|
||||
|
||||
namespace Ui {
|
||||
class GEOtoGK;
|
||||
}
|
||||
|
||||
class GEOtoGK : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GEOtoGK(QWidget *parent = 0);
|
||||
~GEOtoGK();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
|
||||
private:
|
||||
Ui::GEOtoGK *ui;
|
||||
double B, L, l;
|
||||
};
|
||||
|
||||
#endif // GEOTOGK_H
|
395
geotogk.ui
Normal file
395
geotogk.ui
Normal file
@ -0,0 +1,395 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GEOtoGK</class>
|
||||
<widget class="QDialog" name="GEOtoGK">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>269</width>
|
||||
<height>367</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Геодезические в Гаусса-Крюгера</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>251</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Номер зоны</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>10</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>37</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Южное полушарие</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="checkboxmod" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>37</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>60</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>В (широта)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>60</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>град</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>90</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>мин</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>90</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>120</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>сек</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>120</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>150</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>град</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>150</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>180</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>мин</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>180</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>210</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>сек</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>210</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>150</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>L (долгота)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>250</y>
|
||||
<width>251</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>10</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>10</y>
|
||||
<width>51</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>XL</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>40</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>40</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>YL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>330</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Запрос</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>330</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>checkboxmod</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header location="global">checkboxmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
119
gktogeo.cpp
Normal file
119
gktogeo.cpp
Normal file
@ -0,0 +1,119 @@
|
||||
#include "gktogeo.h"
|
||||
#include "ui_gktogeo.h"
|
||||
|
||||
GKtoGEO::GKtoGEO(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::GKtoGEO)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
}
|
||||
|
||||
GKtoGEO::~GKtoGEO()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void GKtoGEO::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void GKtoGEO::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GKtoGEO::on_pushButton_clicked()
|
||||
{
|
||||
int nZone, b1, b2, b3, l1, l2, l3;
|
||||
bool south;
|
||||
|
||||
int XL, YL;
|
||||
|
||||
|
||||
double CB2=8376121.0;
|
||||
double CB4=590.42;
|
||||
double CB6=1.68;
|
||||
double A1,A2,A3,B1,B2,B3,C1,C2,C3,D1,D2,D3,
|
||||
P,PU,G,E,EU,FI,L0,TGA,TGL,U,V,TG,SFI;
|
||||
|
||||
|
||||
|
||||
nZone = ui->lineEdit->text().toInt();
|
||||
south = ui->checkBox->isChecked();
|
||||
|
||||
XL = ui->lineEdit_8->text().toInt();
|
||||
YL = ui->lineEdit_9->text().toInt();
|
||||
|
||||
// ðàñ÷åò
|
||||
|
||||
V=YL-500000.0;
|
||||
U=XL/6367558.497;
|
||||
V=V/6367558.497;
|
||||
A1=sin(2.0*U);
|
||||
B1=cos(2.0*U);
|
||||
A2=2.0*A1*B1;
|
||||
B2=1.0-2.0*A1*A1;
|
||||
A3=A1*B2+A2*B1;
|
||||
B3=B1*B2-A1*A2;
|
||||
C1=sinh(2.0*V);
|
||||
D1=sqrt(1.0+C1*C1);
|
||||
C2=2.0*C1*D1;
|
||||
D2=1.0+2.0*C1*C1;
|
||||
C3=C1*D2+C2*D1;
|
||||
D3=C1*C2+D1*D2;
|
||||
E=U-(CB2*A1*D1+CB4*A2*D2+CB6*A3*D3)*0.0000000001;
|
||||
P=V-(CB2*B1*C1+CB4*B2*C2+CB6*B3*C3)*0.0000000001;
|
||||
EU=10000000000.0-(2.0*CB2*B1*D1+4.0*CB4*B2*D2+
|
||||
6.0*CB6*B3*D3);
|
||||
PU=(2.0*CB2*A1*C1+4.0*CB4*A2*C2+6.0*CB6*A3*C3);
|
||||
SFI=sin(E)/cosh(P);
|
||||
TGL=sinh(P)/cos(E);
|
||||
TGA=SFI*TGL;
|
||||
FI=asin(SFI);
|
||||
B=(5645.0*SFI*SFI-531245.0)*SFI*SFI;
|
||||
B=(B+67385254.0)*SFI*cos(FI)*0.0000000001;
|
||||
B=B+FI;
|
||||
TG=PU/EU;
|
||||
G=atan(TGA)+atan(TG);
|
||||
L=atan(TGL);
|
||||
L0=double(nZone)*6.0-3.0;
|
||||
L0=L0*M_PI/180.0;
|
||||
L=L+L0;
|
||||
if (L<0.0) L=L+(2.0*M_PI);
|
||||
else if (L>(2.0*M_PI)) L=L-(2.0*M_PI);
|
||||
|
||||
|
||||
double X=180.0/M_PI*B;
|
||||
south = (X<0);
|
||||
if (south) X= -X;
|
||||
|
||||
b1 = (int)floor(X);
|
||||
X = (X-b1)*60;
|
||||
b2 = (int)floor(X);
|
||||
X = (X-b2)*60;
|
||||
b3 = (int)floor(X);
|
||||
|
||||
|
||||
X = 180.0/M_PI*L;
|
||||
l1 = (int)floor(X);
|
||||
X = (X-l1)*60;
|
||||
l2 = (int)floor(X);
|
||||
X = (X-l2)*60;
|
||||
l3 = (int)floor(X);
|
||||
|
||||
|
||||
ui->lineEdit_2->setText(QString::number(b1));
|
||||
ui->lineEdit_3->setText(QString::number(b2));
|
||||
ui->lineEdit_4->setText(QString::number(b3));
|
||||
ui->lineEdit_5->setText(QString::number(l1));
|
||||
ui->lineEdit_6->setText(QString::number(l2));
|
||||
ui->lineEdit_7->setText(QString::number(l3));
|
||||
|
||||
|
||||
|
||||
}
|
30
gktogeo.h
Normal file
30
gktogeo.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef GKTOGEO_H
|
||||
#define GKTOGEO_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
#include "geo.h"
|
||||
|
||||
namespace Ui {
|
||||
class GKtoGEO;
|
||||
}
|
||||
|
||||
class GKtoGEO : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GKtoGEO(QWidget *parent = 0);
|
||||
~GKtoGEO();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::GKtoGEO *ui;
|
||||
double B, L, l;
|
||||
};
|
||||
|
||||
#endif // GKTOGEO_H
|
395
gktogeo.ui
Normal file
395
gktogeo.ui
Normal file
@ -0,0 +1,395 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GKtoGEO</class>
|
||||
<widget class="QDialog" name="GKtoGEO">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>273</width>
|
||||
<height>372</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Гаусса-Крюгера в геодезические</string>
|
||||
</property>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>330</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Запрос</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>251</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Номер зоны</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>10</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>37</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Южное полушарие</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="checkboxmod" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>37</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>90</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>XL</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>90</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>60</y>
|
||||
<width>51</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>60</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>YL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>330</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>130</y>
|
||||
<width>251</width>
|
||||
<height>191</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>130</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>70</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>70</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>сек</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>40</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>160</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>сек</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>L (долгота)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>40</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>мин</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>100</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>130</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>мин</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>В (широта)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>160</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>100</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>град</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>10</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>10</y>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>град</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>checkboxmod</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header location="global">checkboxmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
129
gktogk.cpp
Normal file
129
gktogk.cpp
Normal file
@ -0,0 +1,129 @@
|
||||
#include "gktogk.h"
|
||||
#include "ui_gktogk.h"
|
||||
|
||||
GKtoGK::GKtoGK(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::GKtoGK)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
}
|
||||
|
||||
GKtoGK::~GKtoGK()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void GKtoGK::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void GKtoGK::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GKtoGK::on_pushButton_clicked()
|
||||
{
|
||||
int nZone1, nZone2;
|
||||
bool south;
|
||||
|
||||
int XL, YL;
|
||||
int XL1, YL1;
|
||||
|
||||
|
||||
double CB2=8376121.0;
|
||||
double CB4=590.42;
|
||||
double CB6=1.68;
|
||||
|
||||
double CA2=5333.5419;
|
||||
double CA4=4.84339;
|
||||
double CA6=0.007622;
|
||||
|
||||
double A1,A2,A3,B1,B2,B3,C1,C2,C3,D1,D2,D3,
|
||||
P,PU,G,E,EU,FI,L0,TGA,TGL,U,V,TG,SFI,
|
||||
EL,TGE,THP;
|
||||
|
||||
|
||||
nZone1 = ui->lineEdit->text().toInt();
|
||||
south = ui->checkBox->isChecked();
|
||||
|
||||
XL = ui->lineEdit_2->text().toInt();
|
||||
YL = ui->lineEdit_3->text().toInt();
|
||||
|
||||
nZone2 = ui->lineEdit_4->text().toInt();
|
||||
// đŕń÷ĺň
|
||||
|
||||
V=YL-500000.0;
|
||||
U=XL/6367558.497;
|
||||
V=V/6367558.497;
|
||||
A1=sin(2.0*U);
|
||||
B1=cos(2.0*U);
|
||||
A2=2.0*A1*B1;
|
||||
B2=1.0-2.0*A1*A1;
|
||||
A3=A1*B2+A2*B1;
|
||||
B3=B1*B2-A1*A2;
|
||||
C1=sinh(2.0*V);
|
||||
D1=sqrt(1.0+C1*C1);
|
||||
C2=2.0*C1*D1;
|
||||
D2=1.0+2.0*C1*C1;
|
||||
C3=C1*D2+C2*D1;
|
||||
D3=C1*C2+D1*D2;
|
||||
E=U-(CB2*A1*D1+CB4*A2*D2+CB6*A3*D3)*0.0000000001;
|
||||
P=V-(CB2*B1*C1+CB4*B2*C2+CB6*B3*C3)*0.0000000001;
|
||||
EU=10000000000.0-(2.0*CB2*B1*D1+4.0*CB4*B2*D2+
|
||||
6.0*CB6*B3*D3);
|
||||
PU=(2.0*CB2*A1*C1+4.0*CB4*A2*C2+6.0*CB6*A3*C3);
|
||||
SFI=sin(E)/cosh(P);
|
||||
TGL=sinh(P)/cos(E);
|
||||
TGA=SFI*TGL;
|
||||
FI=asin(SFI);
|
||||
B=(5645.0*SFI*SFI-531245.0)*SFI*SFI;
|
||||
B=(B+67385254.0)*SFI*cos(FI)*0.0000000001;
|
||||
B=B+FI;
|
||||
TG=PU/EU;
|
||||
G=atan(TGA)+atan(TG);
|
||||
L=atan(TGL);
|
||||
L0=double(nZone1)*6.0-3.0;
|
||||
L0=L0*M_PI/180.0;
|
||||
L=L+L0;
|
||||
if (L<0.0) L=L+(2.0*M_PI);
|
||||
else if (L>(2.0*M_PI)) L=L-(2.0*M_PI);
|
||||
|
||||
|
||||
|
||||
L0=double(nZone2)*6.0-3.0;
|
||||
L0=L0*M_PI/180.0;
|
||||
EL=L-L0;
|
||||
FI=(2624.0*sin(B)*sin(B)+372834.0)*sin(B)*sin(B);
|
||||
FI=B-((FI+66934216.0)*sin(B)*cos(B)*0.0000000001);
|
||||
TGE=tan(FI)/cos(EL);
|
||||
E=atan(TGE);
|
||||
THP=cos(FI)*sin(EL);
|
||||
P=0.5*log((1.0+THP)/(1.0-THP));
|
||||
A1=sin(2.0*E);
|
||||
B1=cos(2.0*E);
|
||||
C1=sinh(2.0*P);
|
||||
D1=cosh(2.0*P);
|
||||
A2=2.0*A1*B1;
|
||||
B2=1.0-2.0*A1*A1;
|
||||
C2=2.0*C1*D1;
|
||||
D2=1.0+2.0*C1*C1;
|
||||
A3=A1*B2+A2*B1;
|
||||
B3=B1*B2-A1*A2;
|
||||
C3=C1*D2+C2*D1;
|
||||
D3=D1*D2+C1*C2;
|
||||
|
||||
XL1 = (int)(6367558.497*E+CA2*A1*D1+CA4*A2*D2+CA6*A3*D3);
|
||||
if (XL1<0) XL1=-XL1;
|
||||
|
||||
YL1 = (int)(6367558.497*P+CA2*B1*C1+CA4*B2*C2+CA6*B3*C3 + 500000.0);
|
||||
|
||||
|
||||
ui->lineEdit_5->setText(QString::number(XL1));
|
||||
ui->lineEdit_6->setText(QString::number(YL1));
|
||||
}
|
30
gktogk.h
Normal file
30
gktogk.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef GKTOGK_H
|
||||
#define GKTOGK_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
#include "geo.h"
|
||||
|
||||
namespace Ui {
|
||||
class GKtoGK;
|
||||
}
|
||||
|
||||
class GKtoGK : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GKtoGK(QWidget *parent = 0);
|
||||
~GKtoGK();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::GKtoGK *ui;
|
||||
double B, L, l;
|
||||
};
|
||||
|
||||
#endif // GKTOGK_H
|
317
gktogk.ui
Normal file
317
gktogk.ui
Normal file
@ -0,0 +1,317 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GKtoGK</class>
|
||||
<widget class="QDialog" name="GKtoGK">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>250</width>
|
||||
<height>307</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Гаусса-Крюгера (зона1-зона2)</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>231</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>201</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Номер зоны 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>20</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="checkboxmod" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>50</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Южное полушарие</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>80</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>XL1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>YL1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>110</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>140</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Номер зоны 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>140</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>195</x>
|
||||
<y>82</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>195</x>
|
||||
<y>112</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<width>231</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>195</x>
|
||||
<y>50</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>18</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>48</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>YL1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>18</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>XL1</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>48</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>195</x>
|
||||
<y>20</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>270</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Запрос</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>270</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>checkboxmod</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header location="global">checkboxmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
253
grairobject.cpp
Normal file
253
grairobject.cpp
Normal file
@ -0,0 +1,253 @@
|
||||
#include "grairobject.h"
|
||||
#include "widget.h"
|
||||
|
||||
grAirObject::grAirObject(QWidget *parent)
|
||||
{
|
||||
aType = gType = 0;
|
||||
lX = lY = oldLX = oldLY = 0;
|
||||
pic.load(":new/pics/type_0e.xpm");
|
||||
wid = hei = 15;
|
||||
scIndex = 1;
|
||||
coler = new QGraphicsColorizeEffect();
|
||||
coler->setColor(Qt::yellow);
|
||||
|
||||
for (int i=0; i<4; i++) altPoly[i].clear();
|
||||
altPoly[0].setPoints(3, 31,15, 40,15, 35,20);
|
||||
altPoly[1].setPoints(4, 31,20, 40,20, 40,23, 31,23);
|
||||
altPoly[2].setPoints(4, 31,22, 40,22, 40,15, 31,15);
|
||||
altPoly[3].setPoints(3, 31,20, 40,20, 35,15);
|
||||
}
|
||||
|
||||
QRectF grAirObject::boundingRect() const
|
||||
{
|
||||
qreal d = 250/scIndex;
|
||||
if (d<250) d=250;
|
||||
|
||||
return QRectF(-50+lX/scIndex,-50+lY/scIndex,d,d);
|
||||
}
|
||||
|
||||
void grAirObject::setInfoForRocket(qreal cX, qreal cY, qreal cH, qreal vx, qreal vy)
|
||||
{
|
||||
rX = cX;
|
||||
rY = cY;
|
||||
rH = cH;
|
||||
rVx = vx;
|
||||
rVy = vy;
|
||||
rV0 = sqrt(vx*vx+vy*vy);
|
||||
}
|
||||
|
||||
void grAirObject::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
|
||||
if (exist)
|
||||
{
|
||||
QPen locPen;
|
||||
qreal an = 0;
|
||||
locPen.setWidthF(1.3);
|
||||
painter->setPen(locPen);
|
||||
// âåêòîð ñêîðîñòè
|
||||
if (v0) {
|
||||
QLineF lf(0, 0, vY, -vX);
|
||||
// QLineF lf(oldLX, oldLY, lX, lY);
|
||||
an = lf.angle();
|
||||
lf = QLineF(lX/scIndex, lY/scIndex, 0, 0);
|
||||
lf.setAngle(an);
|
||||
lf.setLength(v0*10);
|
||||
painter->drawLine(lf);
|
||||
painter->drawEllipse(lX/scIndex, lY/scIndex, 1, 1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
QImage im(50,50,QImage::Format_ARGB32);
|
||||
im.fill(Qt::transparent);
|
||||
|
||||
QPainter *p = new QPainter(&im);
|
||||
p->setBrush(Qt::SolidPattern);
|
||||
|
||||
// êàðòèíêà
|
||||
if ((viewSettings==0)||(viewSettings==2))
|
||||
p->drawPixmap(15, 15, pic);
|
||||
// ýøåëîí
|
||||
if ((viewSettings!=1)&&(viewSettings!=3))
|
||||
p->drawPolygon(altPoly[alt]);
|
||||
// íîìåð
|
||||
if ((viewSettings!=1)&&(viewSettings!=2))
|
||||
{
|
||||
QFont f = p->font();
|
||||
f.setPointSizeF(7);
|
||||
p->setFont(f);
|
||||
p->drawText(32, 33, QString::number(numb));
|
||||
}
|
||||
p->end();
|
||||
|
||||
if ((an>45)&&(an<210))
|
||||
painter->drawImage(lX/scIndex-10, lY/scIndex-15, im);
|
||||
else
|
||||
painter->drawImage(lX/scIndex-35, lY/scIndex-45, im);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->drawPoint(0,0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void grAirObject::setScaleIndex(qreal s)
|
||||
{
|
||||
if (scIndex!=s){
|
||||
prepareGeometryChange();
|
||||
scIndex=s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void grAirObject::setCoord(qreal cx, qreal cy, qreal ch)
|
||||
{
|
||||
|
||||
cX = cx; cY= cy; cH = ch;
|
||||
|
||||
prepareGeometryChange();
|
||||
oldLX = lX;
|
||||
oldLY = lY;
|
||||
|
||||
|
||||
|
||||
lX=cy;
|
||||
lY=-cx;
|
||||
|
||||
if (ch>=60) alt = 3;
|
||||
else if ((ch>=30)&&(ch<60)) alt=2;
|
||||
else if ((ch>=10)&&(ch<30)) alt=1;
|
||||
else alt = 0;
|
||||
|
||||
}
|
||||
|
||||
void grAirObject::setCoord(qreal cx, qreal cy)
|
||||
{
|
||||
setCoord(cx, cy, cH);
|
||||
}
|
||||
|
||||
void grAirObject::setSpeed(qreal vx, qreal vy)
|
||||
{
|
||||
vX = vx;
|
||||
vY = vy;
|
||||
v0=sqrt(vX*vX+vY*vY);
|
||||
}
|
||||
|
||||
void grAirObject::moveByTime(qreal time)
|
||||
{
|
||||
cX += vX*time;
|
||||
cY += vY*time;
|
||||
setCoord(cX, cY);
|
||||
}
|
||||
|
||||
void grAirObject::setAType(int d)
|
||||
{
|
||||
switch (d) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 10:
|
||||
case 11:
|
||||
|
||||
if (aType!=d)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
aType = d;
|
||||
};
|
||||
break;
|
||||
default:
|
||||
prepareGeometryChange();
|
||||
aType = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
setPic();
|
||||
|
||||
}
|
||||
|
||||
void grAirObject::setGType(int d)
|
||||
{
|
||||
if ((d>=0)&&(d<4)){
|
||||
if (gType!=d)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
gType = d;
|
||||
}
|
||||
else
|
||||
{
|
||||
// prepareGeometryChange();
|
||||
// gType = 0;
|
||||
}
|
||||
}
|
||||
setPic();
|
||||
|
||||
switch (gType)
|
||||
{
|
||||
case 3:
|
||||
coler->setColor(Qt::magenta);
|
||||
break;
|
||||
case 2:
|
||||
coler->setColor(Qt::red);
|
||||
break;
|
||||
case 1:
|
||||
coler->setColor(Qt::green);
|
||||
break;
|
||||
default:
|
||||
coler->setColor(Qt::yellow);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void grAirObject::setPic()
|
||||
{
|
||||
QString s;
|
||||
s=":/new/pics/type_"+QString::number(aType);
|
||||
switch (gType) {
|
||||
case 2:
|
||||
case 3:
|
||||
s+="o.xpm";
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
default:
|
||||
s+="e.xpm";
|
||||
break;
|
||||
}
|
||||
|
||||
pic.load(s);
|
||||
|
||||
}
|
||||
|
||||
void grAirObject::setViewSettings(int d)
|
||||
{
|
||||
if (viewSettings!=d)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
viewSettings = d;
|
||||
}
|
||||
}
|
||||
|
||||
void grAirObject::setNull()
|
||||
{
|
||||
prepareGeometryChange();
|
||||
exist = false;
|
||||
count = 0;
|
||||
setCoord(10000, 10000, 0);
|
||||
setAType(0);
|
||||
setGType(0);
|
||||
setSpeed(0, 0);
|
||||
setInfoForRocket(10000,10000,0,0,0);
|
||||
|
||||
}
|
69
grairobject.h
Normal file
69
grairobject.h
Normal file
@ -0,0 +1,69 @@
|
||||
#ifndef GRAIROBJECT_H
|
||||
#define GRAIROBJECT_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsColorizeEffect>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QBitmap>
|
||||
#include <cmath>
|
||||
|
||||
enum grAirObjType {
|
||||
targetUnknown=0,
|
||||
targetEnemy,
|
||||
targetOwn,
|
||||
targetSpecial
|
||||
};
|
||||
|
||||
class grAirObject : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
grAirObject(QWidget *parent = 0);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
qreal cX, cY, cH;
|
||||
qreal lX, lY;
|
||||
qreal v0, vX, vY;
|
||||
|
||||
|
||||
qreal rX,rY,rH,rVx,rVy, rV0;
|
||||
|
||||
qreal oldLX, oldLY;
|
||||
int alt, aType, gType;
|
||||
QPixmap pic;
|
||||
qreal scIndex;
|
||||
qreal wid, hei;
|
||||
bool exist;
|
||||
int numb;
|
||||
QGraphicsColorizeEffect *coler;
|
||||
QPolygon altPoly[4];
|
||||
int viewSettings;
|
||||
int count;
|
||||
|
||||
void setCoord(qreal cx, qreal cy, qreal ch);
|
||||
void setCoord(qreal cx, qreal cy);
|
||||
void setSpeed(qreal vx, qreal vy);
|
||||
void moveByTime(qreal time);
|
||||
QPointF speeds(int d=0) { if (d) return QPointF(rVx, rVy); else return QPointF(vX, vY);}
|
||||
QPointF coords(int d=0) { if (d) return QPointF(rX, rY); else return QPointF(cX, cY);}
|
||||
QPointF coordsL() {return QPointF(lX, lY);} //äëÿ ãðàôèêè
|
||||
|
||||
void setInfoForRocket(qreal cX, qreal cY, qreal cH, qreal vx, qreal vy);
|
||||
|
||||
void setAType(int d);
|
||||
void setGType(int d);
|
||||
// void setWidth(qreal w) { if (wid!=w) {prepareGeometryChange();wid=w;}}
|
||||
// void setHeight(qreal h) { if (hei!=h) {prepareGeometryChange();hei=h;}}
|
||||
void setScaleIndex(qreal s);
|
||||
|
||||
void setNull();
|
||||
public slots:
|
||||
void setViewSettings(int d);
|
||||
|
||||
protected:
|
||||
void setPic();
|
||||
|
||||
};
|
||||
|
||||
#endif // GRAIROBJECT_H
|
93
graphicsarcitem.cpp
Normal file
93
graphicsarcitem.cpp
Normal file
@ -0,0 +1,93 @@
|
||||
#include "graphicsarcitem.h"
|
||||
|
||||
graphicsArcItem::graphicsArcItem(qreal x, qreal y, qreal r, qreal a1, qreal a2)
|
||||
{
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
this->r = r;
|
||||
this->a1 = a1;
|
||||
this->a2 = a2;
|
||||
this->col = QColor(Qt::black);
|
||||
this->textLeft="";
|
||||
this->textRight="";
|
||||
this->textVisible=false;
|
||||
}
|
||||
|
||||
QRectF graphicsArcItem::boundingRect() const
|
||||
{
|
||||
return QRectF(x-r, y-r, 2*r, 2*r);
|
||||
}
|
||||
|
||||
//QPainterPath graphicsArcItem::shape() const
|
||||
//{
|
||||
// QPainterPath path;
|
||||
// path.moveTo(x+r, y+r);
|
||||
// path.arcTo(boundingRect(), a2, a1);
|
||||
// return path;
|
||||
//}
|
||||
|
||||
void graphicsArcItem::setColor(QColor c)
|
||||
{
|
||||
if (col!=c) {
|
||||
prepareGeometryChange();
|
||||
col = c;
|
||||
}
|
||||
}
|
||||
void graphicsArcItem::setRadius(qreal rr)
|
||||
{
|
||||
if (r!=rr) {
|
||||
prepareGeometryChange();
|
||||
r = rr;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsArcItem::setAngle1(qreal a)
|
||||
{
|
||||
if (a1 != a) {
|
||||
prepareGeometryChange();
|
||||
a1=a;
|
||||
}
|
||||
}
|
||||
void graphicsArcItem::setAngle2(qreal a)
|
||||
{
|
||||
if (a2 != a) {
|
||||
prepareGeometryChange();
|
||||
a2=a;
|
||||
}
|
||||
}
|
||||
void graphicsArcItem::setAngles(qreal aa, qreal ab)
|
||||
{
|
||||
setAngle1(aa);
|
||||
setAngle2(ab);
|
||||
}
|
||||
|
||||
void graphicsArcItem::setText(QString str1, QString str2)
|
||||
{
|
||||
if ((textLeft!=str1)||(textRight!=str2))
|
||||
{
|
||||
prepareGeometryChange();
|
||||
textLeft = str1;
|
||||
textRight = str2;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsArcItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
painter->setPen(QPen(col));
|
||||
painter->drawPie(boundingRect(), a1*16, (a2-a1)*16);
|
||||
|
||||
if (textVisible)
|
||||
{
|
||||
|
||||
qreal fs = r/223;
|
||||
|
||||
|
||||
painter->setPen(QPen(Qt::white));
|
||||
QFont f = painter->font();
|
||||
f.setPointSizeF(fs*7);
|
||||
painter->setFont(f);
|
||||
|
||||
painter->drawText(x+0.95*r*cos(a1/180*M_PI), y-0.95*r*sin(a1/180*M_PI), textLeft);
|
||||
painter->drawText(x+0.95*r*cos(a2/180*M_PI), y-0.95*r*sin(a2/180*M_PI), textRight);
|
||||
}
|
||||
}
|
48
graphicsarcitem.h
Normal file
48
graphicsarcitem.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef GRAPHICSARCITEM_H
|
||||
#define GRAPHICSARCITEM_H
|
||||
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QPainter>
|
||||
#include "math.h"
|
||||
|
||||
class graphicsArcItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
graphicsArcItem(qreal x=0, qreal y=0, qreal r=0, qreal a1=0, qreal a2=0);
|
||||
QRectF boundingRect() const;
|
||||
// QPainterPath shape() const;
|
||||
|
||||
|
||||
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
qreal radius() {return r;}
|
||||
QColor color() {return col;}
|
||||
qreal angle1() {return a1;}
|
||||
qreal angle2() {return a2;}
|
||||
void setColor(QColor c);
|
||||
void setRadius(qreal rr);
|
||||
void setAngle1(qreal a);
|
||||
void setAngle2(qreal a);
|
||||
void setAngles(qreal aa, qreal ab);
|
||||
bool isTextVisible() {return textVisible;}
|
||||
void setTextVisible(bool fl) {textVisible=fl;}
|
||||
|
||||
void setText(QString str1="", QString str2="");
|
||||
void setText1(QString str) {prepareGeometryChange();textLeft=str;}
|
||||
void setText2(QString str) {prepareGeometryChange();textRight=str;}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
qreal x, y, r, a1, a2;
|
||||
QColor col;
|
||||
bool textVisible;
|
||||
QString textLeft, textRight;
|
||||
};
|
||||
|
||||
#endif // GRAPHICSARCITEM_H
|
||||
|
||||
|
73
graphicscrossitem.cpp
Normal file
73
graphicscrossitem.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
#include "graphicscrossitem.h"
|
||||
|
||||
graphicsCrossItem::graphicsCrossItem(qreal px, qreal py)
|
||||
{
|
||||
x = px;
|
||||
y = py;
|
||||
dim=3;
|
||||
col = QColor(Qt::lightGray);
|
||||
scIndex=1;
|
||||
|
||||
}
|
||||
|
||||
QRectF graphicsCrossItem::boundingRect() const
|
||||
{
|
||||
qreal d = dim*scIndex;
|
||||
|
||||
return QRectF(x-d, y-d, 2*d, 2*d);
|
||||
}
|
||||
|
||||
|
||||
void graphicsCrossItem::setColor(QColor c)
|
||||
{
|
||||
if (col!=c) {
|
||||
prepareGeometryChange();
|
||||
col = c;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsCrossItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
qreal d = dim*scIndex;
|
||||
painter->setPen(QPen(col));
|
||||
QPointF p1(x-d, y-d);
|
||||
QPointF p2(x+d, y+d);
|
||||
QPointF p3(x-d, y+d);
|
||||
QPointF p4(x+d, y-d);
|
||||
|
||||
painter->drawLine(p1, p2);
|
||||
painter->drawLine(p3, p4);
|
||||
|
||||
}
|
||||
|
||||
void graphicsCrossItem::setPos(QPointF p)
|
||||
{
|
||||
qreal px, py;
|
||||
px= p.x(); py= p.y();
|
||||
|
||||
if ((x!=px)||(y!=py) ) {
|
||||
prepareGeometryChange();
|
||||
x=px; y=py;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsCrossItem::setPosPolar(qreal d, qreal a)
|
||||
{
|
||||
if (d>0)
|
||||
{
|
||||
setPos(cos((90-a)/180*M_PI)*d, -sin((90-a)/180*M_PI)*d);
|
||||
}
|
||||
else
|
||||
{
|
||||
setPos(0,0);
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsCrossItem::setScaleIndex(qreal s)
|
||||
{
|
||||
if (scIndex!=s){
|
||||
prepareGeometryChange();
|
||||
scIndex=s;
|
||||
}
|
||||
|
||||
}
|
39
graphicscrossitem.h
Normal file
39
graphicscrossitem.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef GRAPHICSCROSSITEM_H
|
||||
#define GRAPHICSCROSSITEM_H
|
||||
|
||||
#include <QColor>
|
||||
#include <QGraphicsItem>
|
||||
#include <QPainter>
|
||||
#include "math.h"
|
||||
|
||||
class graphicsCrossItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
graphicsCrossItem(qreal x=0, qreal y=0);
|
||||
QRectF boundingRect() const;
|
||||
// QPainterPath shape() const;
|
||||
|
||||
|
||||
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
QColor color() {return col;}
|
||||
void setColor(QColor c);
|
||||
void setPos(QPointF p);
|
||||
void setPos(qreal x, qreal y) {setPos(QPointF(x, y));}
|
||||
|
||||
void setPosPolar(qreal d, qreal a);
|
||||
|
||||
void setScaleIndex(qreal s);
|
||||
|
||||
private:
|
||||
qreal x, y, dim, scIndex;
|
||||
QColor col;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // GRAPHICSARCITEM_H
|
||||
|
||||
|
239
graphicslineitem.cpp
Normal file
239
graphicslineitem.cpp
Normal file
@ -0,0 +1,239 @@
|
||||
#include "graphicslineitem.h"
|
||||
|
||||
graphicsLineItem::graphicsLineItem(QObject *parent)
|
||||
|
||||
{
|
||||
x0 = x1 = y0 = y1 = wid = 0;
|
||||
drawCircles = 0;
|
||||
col = QColor(Qt::black);
|
||||
}
|
||||
|
||||
QRectF graphicsLineItem::boundingRect() const
|
||||
{
|
||||
QPointF p1;
|
||||
if (x0>x1) {
|
||||
if (y0>y1) p1 = QPointF(x1, y1);
|
||||
else p1 = QPointF(x1, y0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (y0>y1) p1 = QPointF(x0, y1);
|
||||
else p1 = QPointF(x0, y0);
|
||||
}
|
||||
|
||||
QSizeF s = QSizeF(fabs(x0-x1), fabs(y0-y1));
|
||||
|
||||
return QRectF(p1, s);
|
||||
}
|
||||
|
||||
void graphicsLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
|
||||
QPen p;
|
||||
QFont f = painter->font();
|
||||
|
||||
|
||||
|
||||
p.setColor(col);
|
||||
p.setWidthF(wid);
|
||||
p.setCapStyle(Qt::FlatCap);
|
||||
|
||||
painter->setPen(p);
|
||||
painter->setBrush(QBrush(Qt::SolidPattern));
|
||||
painter->drawLine(QPointF(x0,y0), QPointF(x1, y1));
|
||||
if (drawCircles&0x1) painter->drawEllipse(QPointF(x0,y0), wid*1.5, wid*1.5);
|
||||
if (drawCircles&0x2) painter->drawEllipse(QPointF(x1,y1), wid*1.5, wid*1.5);
|
||||
|
||||
|
||||
painter->save();
|
||||
for (int i=0; i<2; i++)
|
||||
{
|
||||
if (! str[i].txt.isEmpty())
|
||||
{
|
||||
p.setColor(str[i].col);
|
||||
f.setPointSizeF(str[i].size);
|
||||
|
||||
painter->setFont(f);
|
||||
painter->setPen(p);
|
||||
painter->drawText(str[i].pos, str[i].txt);
|
||||
}
|
||||
}
|
||||
painter->restore();
|
||||
|
||||
}
|
||||
|
||||
void graphicsLineItem::setCircles(bool f1, bool f2)
|
||||
{
|
||||
int ret = 0x0;
|
||||
if (f1) ret+=0x1;
|
||||
if (f2) ret+=0x2;
|
||||
drawCircles=ret;
|
||||
}
|
||||
|
||||
void graphicsLineItem::setColor(QColor c)
|
||||
{
|
||||
if (col!=c)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
col = c;
|
||||
}
|
||||
}
|
||||
|
||||
QPointF graphicsLineItem::pos0() {return QPointF(x0,y0);}
|
||||
QPointF graphicsLineItem::pos1() {return QPointF(x1,y1);}
|
||||
|
||||
void graphicsLineItem::setPos0(QPointF p)
|
||||
{
|
||||
qreal x, y;
|
||||
x= p.x(); y= p.y();
|
||||
|
||||
if ((x0!=x)||(y0!=y) ) {
|
||||
prepareGeometryChange();
|
||||
x0=x; y0=y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void graphicsLineItem::setPos1(QPointF p)
|
||||
{
|
||||
qreal x, y;
|
||||
x= p.x(); y= p.y();
|
||||
|
||||
if ((x1!=x)||(y1!=y) ) {
|
||||
prepareGeometryChange();
|
||||
x1=x; y1=y;
|
||||
}
|
||||
}
|
||||
|
||||
qreal graphicsLineItem::length()
|
||||
{
|
||||
QLineF lf = QLineF(x0,y0,x1,y1);
|
||||
return lf.length();
|
||||
}
|
||||
|
||||
void graphicsLineItem::setLength(qreal l)
|
||||
{
|
||||
QLineF lf = QLineF(x0,y0,x1,y1);
|
||||
lf.setLength(l);
|
||||
|
||||
QPointF p = lf.p2();
|
||||
|
||||
if ((x1!=p.x())||(y1!=p.y())) {
|
||||
prepareGeometryChange();
|
||||
x1=p.x(); y1=p.y();
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsLineItem::setAngle(qreal a)
|
||||
{
|
||||
QLineF lf = QLineF(x0,y0,x1,y1);
|
||||
lf.setAngle(a);
|
||||
|
||||
QPointF p = lf.p2();
|
||||
|
||||
if ((x1!=p.x())||(y1!=p.y())) {
|
||||
prepareGeometryChange();
|
||||
x1=p.x(); y1=p.y();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void graphicsLineItem::setGlobalAngle(qreal a) // ïîâîðîò ëèíèè îòíîñèòåëüíî òî÷êè 0,0
|
||||
{
|
||||
QLineF lf, lf1;
|
||||
|
||||
lf = QLineF(0,0,x0,y0);
|
||||
lf.setAngle(a);
|
||||
QPointF p = lf.p2();
|
||||
lf1 = QLineF(0,0,x1,y1);
|
||||
lf1.setAngle(a);
|
||||
QPointF p1 = lf1.p2();
|
||||
|
||||
if ((x0!=p.x())||(y0!=p.y())||(x1!=p1.x())||(y1!=p1.y())) {
|
||||
prepareGeometryChange();
|
||||
x0=p.x(); y0=p.y();
|
||||
x1=p1.x(); y1=p1.y();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void graphicsLineItem::setWidth(qreal w)
|
||||
{
|
||||
if (wid!=w) {
|
||||
prepareGeometryChange();
|
||||
wid = w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void graphicsLineItem::setText(QString s, int d)
|
||||
{
|
||||
if ((d==0)||(d==1))
|
||||
if (str[d].txt!=s)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
str[d].txt = s;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsLineItem::setTextPos(QPointF p, int d)
|
||||
{
|
||||
if ((d==0)||(d==1))
|
||||
if (str[d].pos!=p) {
|
||||
prepareGeometryChange();
|
||||
str[d].pos = p;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsLineItem::setTextColor(QColor c, int d)
|
||||
{
|
||||
if ((d==0)||(d==1))
|
||||
if (str[d].col!=c) {
|
||||
prepareGeometryChange();
|
||||
str[d].col = c;
|
||||
}
|
||||
}
|
||||
|
||||
QString graphicsLineItem::getText(int d)
|
||||
{
|
||||
if ((d==0)||(d==1)) return str[d].txt;
|
||||
else return 0;
|
||||
|
||||
}
|
||||
|
||||
QColor graphicsLineItem::getTextColor(int d)
|
||||
{
|
||||
if ((d==0)||(d==1)) return str[d].col;
|
||||
else return QColor(Qt::black);
|
||||
|
||||
}
|
||||
|
||||
QPointF graphicsLineItem::getTextPos(int d)
|
||||
{
|
||||
if ((d==0)||(d==1)) return str[d].pos;
|
||||
else return QPointF(0,0);
|
||||
}
|
||||
|
||||
qreal graphicsLineItem::getTextSize(int d)
|
||||
{
|
||||
if ((d==0)||(d==1))
|
||||
return str[d].size;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
void graphicsLineItem::setTextSize(qreal s, int d)
|
||||
{
|
||||
if ((d==0)||(d==1))
|
||||
if (str[d].size!=s) {
|
||||
prepareGeometryChange();
|
||||
str[d].size = s;
|
||||
}
|
||||
}
|
||||
|
||||
|
68
graphicslineitem.h
Normal file
68
graphicslineitem.h
Normal file
@ -0,0 +1,68 @@
|
||||
#ifndef GRAPHICSLINEITEM_H
|
||||
#define GRAPHICSLINEITEM_H
|
||||
|
||||
#include <QGraphicsLineItem>
|
||||
#include <QPainter>
|
||||
#include <cmath>
|
||||
|
||||
struct T_txtAttr
|
||||
{
|
||||
QString txt;
|
||||
QColor col;
|
||||
QPointF pos;
|
||||
qreal size;
|
||||
};
|
||||
|
||||
class graphicsLineItem : public QGraphicsLineItem
|
||||
{
|
||||
|
||||
public:
|
||||
graphicsLineItem(QObject *parent = 0);
|
||||
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
void setColor(QColor c);
|
||||
QColor color() {return col;}
|
||||
QPointF pos0();
|
||||
QPointF pos1();
|
||||
void setPos0(QPointF p);
|
||||
void setPos0(qreal a, qreal b) {setPos0(QPointF(a, b));}
|
||||
void setPos0(int a, int b) {setPos0(qreal(a), qreal(b));}
|
||||
|
||||
void setPos1(QPointF p);
|
||||
void setPos1(qreal a, qreal b) {setPos1(QPointF(a, b));}
|
||||
void setPos1(int a, int b) {setPos1(qreal(a), qreal(b));}
|
||||
|
||||
qreal length();
|
||||
void setLength(qreal l);
|
||||
void setAngle(qreal a);
|
||||
void setGlobalAngle(qreal a);
|
||||
void setWidth(qreal w);
|
||||
|
||||
QString getText(int d=0) ;
|
||||
QPointF getTextPos(int d=0);
|
||||
QColor getTextColor(int d=0);
|
||||
qreal getTextSize(int d=0);
|
||||
|
||||
void setText(QString s, int d=0);
|
||||
void setTextPos(QPointF p, int d=0);
|
||||
void setTextColor(QColor c, int d =0);
|
||||
void setTextSize(qreal s, int d = 0);
|
||||
|
||||
void setCircles(bool f1, bool f2);
|
||||
|
||||
|
||||
private:
|
||||
qreal x0,x1,y0,y1;
|
||||
QColor col;
|
||||
qreal wid;
|
||||
|
||||
T_txtAttr str[2];
|
||||
|
||||
int drawCircles;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // GRAPHICSLINEITEM_H
|
129
graphicsviewmod.cpp
Normal file
129
graphicsviewmod.cpp
Normal file
@ -0,0 +1,129 @@
|
||||
#include "graphicsviewmod.h"
|
||||
|
||||
|
||||
GraphicsViewMod::GraphicsViewMod(QWidget *parent):QGraphicsView(parent)
|
||||
{
|
||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
scMeter = 1;
|
||||
ugR = ugL = numT = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GraphicsViewMod::drawBackground(QPainter *painter, const QRectF &rect)
|
||||
{
|
||||
|
||||
painter->save();
|
||||
painter->setBrush(QBrush(Qt::black));
|
||||
painter->drawRect(rect);
|
||||
painter->restore();
|
||||
|
||||
painter->setBackground(QBrush(Qt::black));
|
||||
painter->setBackground(QBrush(Qt::SolidPattern));
|
||||
|
||||
QPen p = painter->pen();
|
||||
painter->setPen(QColor(Qt::lightGray));
|
||||
|
||||
|
||||
qreal d = 30;
|
||||
qreal rad = height()/2 - d;
|
||||
QPointF cent=QPointF(width()/2, height()/2);
|
||||
QRect cr = QRect(cent.x()-rad, cent.y()-rad, rad*2, rad*2);
|
||||
|
||||
|
||||
|
||||
painter->drawEllipse(mapToScene(QPolygon(cr)).boundingRect());
|
||||
|
||||
qreal lx1, lx2, ly1, ly2;
|
||||
qreal phi;
|
||||
qreal lin = 2;
|
||||
QPolygonF poly;
|
||||
QString str;
|
||||
QFont f = painter->font();
|
||||
|
||||
cr.setSize(QSize(1,1));
|
||||
qreal fs = mapToScene(cr).boundingRect().height();
|
||||
|
||||
f.setPointSizeF(fs*10);
|
||||
painter->setFont(f);
|
||||
|
||||
|
||||
for (int i=0; i<60; i++)
|
||||
{
|
||||
phi = 2*M_PI/60*i;
|
||||
|
||||
lx1=(rad-lin)*sin(phi)+cent.x();
|
||||
ly1=-(rad-lin)*cos(phi)+cent.y();
|
||||
|
||||
lx2 = lx1+2*lin*sin(phi);
|
||||
ly2 = ly1-2*lin*cos(phi);
|
||||
|
||||
poly.clear();
|
||||
poly << mapToScene(QPoint(lx1, ly1)) << mapToScene(QPoint(lx2, ly2));
|
||||
painter->drawPolygon(poly);
|
||||
|
||||
lx2 = lx1+6*lin*sin(phi)-4;
|
||||
ly2 = ly1-6*lin*cos(phi)+4;
|
||||
|
||||
|
||||
str = QString::number(i);
|
||||
|
||||
|
||||
painter->drawText(mapToScene(QPoint(lx2, ly2)), str);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int du, mdu;
|
||||
str.clear();
|
||||
if (ugL<0){ str.append("-");}
|
||||
|
||||
du = abs(ugL)/100; mdu = abs(ugL)%100;
|
||||
if (du<10) str.append("0");
|
||||
str.append(QString::number(du));
|
||||
str.append("-");
|
||||
if (mdu<10) str.append("0");
|
||||
str.append(QString::number(mdu));
|
||||
|
||||
painter->drawText(mapToScene(QPoint(width()-45, 22)), str);
|
||||
|
||||
str.clear();
|
||||
if (ugR<0) { str.append("-");}
|
||||
|
||||
du = abs(ugR)/100; mdu = abs(ugR)%100;
|
||||
if (du<10) str.append("0");
|
||||
str.append(QString::number(du));
|
||||
str.append("-");
|
||||
if (mdu<10) str.append("0");
|
||||
str.append(QString::number(mdu));
|
||||
|
||||
painter->drawText(mapToScene(QPoint(width()-45, 33)), str);
|
||||
|
||||
if (numT<0) numT = 0;
|
||||
str.setNum(numT);
|
||||
painter->drawText(mapToScene(QPoint(width()-45, 44)), str);
|
||||
|
||||
// str.setNum(scMeter);
|
||||
// painter->drawText(mapToScene(QPoint(cent.x()+40,cent.y()+40)), str);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void GraphicsViewMod::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
int num = e->delta()/120;
|
||||
if (num!=0)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
e->accept();
|
||||
centerOn(0,0);
|
||||
|
||||
}
|
28
graphicsviewmod.h
Normal file
28
graphicsviewmod.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef GRAPHICSVIEWMOD_H
|
||||
#define GRAPHICSVIEWMOD_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QPainter>
|
||||
#include <QWheelEvent>
|
||||
#include <QGraphicsRectItem>
|
||||
#include "math.h"
|
||||
|
||||
class GraphicsViewMod : public QGraphicsView
|
||||
{
|
||||
public:
|
||||
GraphicsViewMod(QWidget *parent);
|
||||
qreal scMeter;
|
||||
int ugL, ugR, numT;
|
||||
|
||||
void setMissUgL(int ug) {ugL = ug;}
|
||||
void setMissUgR(int ug) {ugR = ug;}
|
||||
void setMissUg(int ugL, int ugR) {setMissUgL(ugL); setMissUgR(ugR);}
|
||||
void setNumTarg(int num) {numT = num;}
|
||||
protected:
|
||||
void drawBackground(QPainter *painter, const QRectF &rect);
|
||||
|
||||
private:
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
};
|
||||
|
||||
#endif // GRAPHICSVIEWMOD_H
|
68
main.cpp
Normal file
68
main.cpp
Normal file
@ -0,0 +1,68 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include "widget.h"
|
||||
|
||||
#include <qmessagebox.h>
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
|
||||
Widget w;
|
||||
QString str;
|
||||
|
||||
QFile f("c:/Shilka_exe/global.ini");
|
||||
int c=0;
|
||||
|
||||
|
||||
|
||||
if (f.open(QIODevice::ReadOnly |QIODevice::Text ))
|
||||
{
|
||||
while (!f.atEnd())
|
||||
{
|
||||
c++;
|
||||
str = QString(f.readLine());
|
||||
switch (c)
|
||||
{
|
||||
case 1:
|
||||
if (str.section('=', 1, 1).toInt())
|
||||
w.setWindowState(Qt::WindowFullScreen);
|
||||
break;
|
||||
case 2:
|
||||
// silentMode
|
||||
w.silentMode = str.section('=',1,1).toInt();
|
||||
break;
|
||||
case 3:
|
||||
// quickLoad
|
||||
w.quickLoad = str.section('=', 1, 1).toInt();
|
||||
|
||||
break;
|
||||
case 4:
|
||||
w.keybMaxDelay = str.section('=', 1, 1).toInt();
|
||||
if (w.keybMaxDelay<10) w.keybMaxDelay = 10;
|
||||
break;
|
||||
case 5:
|
||||
w.loadingShift = str.section('=',1,1).toInt();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
w.loadingShift=50;
|
||||
w.keybMaxDelay=20;
|
||||
// w.setWindowState(Qt::WindowFullScreen);
|
||||
w.quickLoad = true;
|
||||
w.silentMode = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
38
menubarmod.cpp
Normal file
38
menubarmod.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
#include "menubarmod.h"
|
||||
|
||||
#include <QMenu>
|
||||
|
||||
MenuBarMod::MenuBarMod(QWidget *parent) :
|
||||
QMenuBar(parent)
|
||||
{
|
||||
setNativeMenuBar(false);
|
||||
setStyleSheet("QMenuBar::item:selected { background: #a8a8a8;}");
|
||||
|
||||
}
|
||||
|
||||
void MenuBarMod::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
|
||||
QList<QAction*> al = this->actions();
|
||||
bool fl=true;
|
||||
|
||||
if (!al.isEmpty())
|
||||
{
|
||||
|
||||
|
||||
if ((e->key()==Qt::Key_Right)&&(al.last()==activeAction())) {
|
||||
setActiveAction(0);
|
||||
emit rightPressed(uid);
|
||||
fl=false;
|
||||
}
|
||||
|
||||
if ((e->key()==Qt::Key_Left)&&(al.at(0)==activeAction())) {
|
||||
setActiveAction(0);
|
||||
emit leftPressed(uid);
|
||||
fl=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fl) QMenuBar::keyPressEvent(e);
|
||||
}
|
24
menubarmod.h
Normal file
24
menubarmod.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef MENUBARMOD_H
|
||||
#define MENUBARMOD_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QMenuBar>
|
||||
#include <QKeyEvent>
|
||||
#include <QAction>
|
||||
|
||||
class MenuBarMod : public QMenuBar
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MenuBarMod(QWidget *parent = 0);
|
||||
|
||||
int uid;
|
||||
signals:
|
||||
void rightPressed(int);
|
||||
void leftPressed(int);
|
||||
public slots:
|
||||
|
||||
private:
|
||||
virtual void keyPressEvent ( QKeyEvent * e );
|
||||
};
|
||||
#endif // MENUBARMOD_H
|
73
meteosred.cpp
Normal file
73
meteosred.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
#include "meteosred.h"
|
||||
#include "ui_meteosred.h"
|
||||
|
||||
|
||||
meteosred::meteosred(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::meteosred)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
Widget *w = (Widget*)parent;
|
||||
w->changeOpenWidget(this);
|
||||
|
||||
ui->checkBox->setChecked(w->meteoAvtonom);
|
||||
ui->checkBox->uid=1;
|
||||
|
||||
ui->checkBox_2->setChecked(w->meteoSred);
|
||||
ui->checkBox_2->uid=2;
|
||||
|
||||
connect(ui->checkBox, SIGNAL(clicked()), this, SLOT(changeItems()));
|
||||
connect(ui->checkBox_2, SIGNAL(clicked()), this, SLOT(changeItems()));
|
||||
|
||||
}
|
||||
|
||||
void meteosred::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
meteosred::~meteosred()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void meteosred::changeItems()
|
||||
{
|
||||
switch (((checkboxmod*)sender())->uid)
|
||||
{
|
||||
case 1:
|
||||
ui->checkBox_2->setChecked(!(ui->checkBox->isChecked()));
|
||||
break;
|
||||
case 2:
|
||||
ui->checkBox->setChecked(!(ui->checkBox_2->isChecked()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void meteosred::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void meteosred::on_pushButton_clicked()
|
||||
{
|
||||
bool l, l1;
|
||||
Widget *w = (Widget*)parent();
|
||||
|
||||
|
||||
l = ui->checkBox->isChecked();
|
||||
l1 = ui->checkBox_2->isChecked();
|
||||
|
||||
w->setMeteo(l, l1);
|
||||
|
||||
((Widget*)parent())->writeFile();
|
||||
|
||||
|
||||
close();
|
||||
}
|
31
meteosred.h
Normal file
31
meteosred.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef METEOSRED_H
|
||||
#define METEOSRED_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
namespace Ui {
|
||||
class meteosred;
|
||||
}
|
||||
|
||||
class meteosred : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit meteosred(QWidget *parent = 0);
|
||||
~meteosred();
|
||||
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
void changeItems();
|
||||
|
||||
void closeEvent(QCloseEvent *event);
|
||||
private:
|
||||
Ui::meteosred *ui;
|
||||
};
|
||||
|
||||
#endif // METEOSRED_H
|
146
meteosred.ui
Normal file
146
meteosred.ui
Normal file
@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>meteosred</class>
|
||||
<widget class="QDialog" name="meteosred">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>218</width>
|
||||
<height>129</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>218</width>
|
||||
<height>129</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>218</width>
|
||||
<height>129</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Режимы метео</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>201</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="checkboxmod" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>10</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="checkboxmod" name="checkBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>40</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Метеоавтономный</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Метеосредний</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>90</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отмена</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>checkboxmod</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>checkboxmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
42
nastrel.cpp
Normal file
42
nastrel.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
#include "nastrel.h"
|
||||
#include "ui_nastrel.h"
|
||||
|
||||
nastrel::nastrel(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::nastrel)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
|
||||
ZAnastrel = 0;
|
||||
ZAnastrel = (((Widget*)parent)->ZAnastrel);
|
||||
ui->lineEdit->setText(QString::number(ZAnastrel));
|
||||
}
|
||||
|
||||
nastrel::~nastrel()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void nastrel::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void nastrel::on_pushButton_2_clicked()
|
||||
{
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
void nastrel::on_pushButton_clicked()
|
||||
{
|
||||
ZAnastrel = ui->lineEdit->text().toInt();
|
||||
((Widget*)parent())->ZAnastrel = ZAnastrel;
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
29
nastrel.h
Normal file
29
nastrel.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef NASTREL_H
|
||||
#define NASTREL_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class nastrel;
|
||||
}
|
||||
|
||||
class nastrel : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit nastrel(QWidget *parent = 0);
|
||||
~nastrel();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::nastrel *ui;
|
||||
int ZAnastrel;
|
||||
};
|
||||
|
||||
#endif // NASTREL_H
|
88
nastrel.ui
Normal file
88
nastrel.ui
Normal file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>nastrel</class>
|
||||
<widget class="QDialog" name="nastrel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>222</width>
|
||||
<height>150</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод настрела стволов</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>201</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>17</x>
|
||||
<y>20</y>
|
||||
<width>101</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Настрел стволов</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>127</x>
|
||||
<y>27</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>110</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
33
ownadr.cpp
Normal file
33
ownadr.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
#include "ownadr.h"
|
||||
#include "ui_ownadr.h"
|
||||
|
||||
ownAdr::ownAdr(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ownAdr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
}
|
||||
|
||||
ownAdr::~ownAdr()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ownAdr::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void ownAdr::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void ownAdr::on_pushButton_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
28
ownadr.h
Normal file
28
ownadr.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef OWNADR_H
|
||||
#define OWNADR_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class ownAdr;
|
||||
}
|
||||
|
||||
class ownAdr : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ownAdr(QWidget *parent = 0);
|
||||
~ownAdr();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::ownAdr *ui;
|
||||
};
|
||||
|
||||
#endif // OWNADR_H
|
91
ownadr.ui
Normal file
91
ownadr.ui
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ownAdr</class>
|
||||
<widget class="QDialog" name="ownAdr">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>220</width>
|
||||
<height>139</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Собственный адрес</string>
|
||||
</property>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>100</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>201</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>17</x>
|
||||
<y>20</y>
|
||||
<width>101</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Собственный адрес</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>135</x>
|
||||
<y>25</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
21
pics.qrc
Normal file
21
pics.qrc
Normal file
@ -0,0 +1,21 @@
|
||||
<RCC>
|
||||
<qresource prefix="/new">
|
||||
<file>pics/type_0e.xpm</file>
|
||||
<file>pics/type_0o.xpm</file>
|
||||
<file>pics/type_1e.xpm</file>
|
||||
<file>pics/type_1o.xpm</file>
|
||||
<file>pics/type_6e.xpm</file>
|
||||
<file>pics/type_6o.xpm</file>
|
||||
<file>pics/type_7e.xpm</file>
|
||||
<file>pics/type_7o.xpm</file>
|
||||
<file>pics/type_8e.xpm</file>
|
||||
<file>pics/type_8o.xpm</file>
|
||||
<file>pics/type_10e.xpm</file>
|
||||
<file>pics/type_10o.xpm</file>
|
||||
<file>pics/type_11e.xpm</file>
|
||||
<file>pics/type_11o.xpm</file>
|
||||
</qresource>
|
||||
<qresource prefix="/fon">
|
||||
<file>pics/loading.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
pics/loading.png
Normal file
BIN
pics/loading.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 501 KiB |
21
pics/type_0e.xpm
Normal file
21
pics/type_0e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
".......###......",
|
||||
".....#######....",
|
||||
".....#######....",
|
||||
".....#######....",
|
||||
".......###......",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_0o.xpm
Normal file
21
pics/type_0o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
".......###......",
|
||||
".....#######....",
|
||||
".....#######....",
|
||||
".....#######....",
|
||||
".......###......",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_10e.xpm
Normal file
21
pics/type_10e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"....#.....###...",
|
||||
"....##...####...",
|
||||
"....###.####....",
|
||||
"....#######.....",
|
||||
"....######......",
|
||||
"....#######.....",
|
||||
"...#########....",
|
||||
"..####..........",
|
||||
".####...........",
|
||||
".###............",
|
||||
".##.............",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_10o.xpm
Normal file
21
pics/type_10o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"....#.....###...",
|
||||
"....##...####...",
|
||||
"....###.####....",
|
||||
"....#######.....",
|
||||
"....######......",
|
||||
"....#######.....",
|
||||
"...#########....",
|
||||
"..####..........",
|
||||
".####...........",
|
||||
".###............",
|
||||
".##.............",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_11e.xpm
Normal file
21
pics/type_11e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"....#.....###...",
|
||||
"....##...####...",
|
||||
"....###.####....",
|
||||
"....#######.....",
|
||||
"....######......",
|
||||
"....#######.....",
|
||||
"...#########....",
|
||||
"..####..........",
|
||||
".####...........",
|
||||
".###............",
|
||||
".##.............",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_11o.xpm
Normal file
21
pics/type_11o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"....#.....###...",
|
||||
"....##...####...",
|
||||
"....###.####....",
|
||||
"....#######.....",
|
||||
"....######......",
|
||||
"....#######.....",
|
||||
"...#########....",
|
||||
"..####..........",
|
||||
".####...........",
|
||||
".###............",
|
||||
".##.............",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_1e.xpm
Normal file
21
pics/type_1e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"...........#....",
|
||||
"....#.....##....",
|
||||
"....##....###...",
|
||||
"....##....###...",
|
||||
"....##...###....",
|
||||
"....##..###.....",
|
||||
"....##.###......",
|
||||
"....#####.......",
|
||||
"....##########..",
|
||||
"....###########.",
|
||||
"...###..........",
|
||||
"..###...........",
|
||||
".###............",
|
||||
"###.............",
|
||||
"##..............",
|
||||
"................"};
|
21
pics/type_1o.xpm
Normal file
21
pics/type_1o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"...........#....",
|
||||
"....#.....##....",
|
||||
"....##....###...",
|
||||
"....##....###...",
|
||||
"....##...###....",
|
||||
"...###..###.....",
|
||||
"..####.###......",
|
||||
".##.#####.......",
|
||||
"##..##########..",
|
||||
"....###########.",
|
||||
"...###...##.....",
|
||||
"..###...##......",
|
||||
".###...##.......",
|
||||
"###...##........",
|
||||
"##..............",
|
||||
"................"};
|
21
pics/type_6e.xpm
Normal file
21
pics/type_6e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"...........##...",
|
||||
"..........###...",
|
||||
"....#....##.....",
|
||||
"....######......",
|
||||
"....#####.......",
|
||||
"....#####.......",
|
||||
"....#######.....",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_6o.xpm
Normal file
21
pics/type_6o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"...........##...",
|
||||
"..........###...",
|
||||
"....#....##.....",
|
||||
"....######......",
|
||||
"....#####.......",
|
||||
"....#####.......",
|
||||
"....#######.....",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_7e.xpm
Normal file
21
pics/type_7e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
".........#......",
|
||||
".........##.....",
|
||||
"...#.....#####..",
|
||||
"...#.....#####..",
|
||||
"...##...########",
|
||||
"...########.....",
|
||||
"...#######......",
|
||||
"...######.......",
|
||||
"..#########.....",
|
||||
".#############..",
|
||||
"#####...........",
|
||||
"###.............",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_7o.xpm
Normal file
21
pics/type_7o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
".........#......",
|
||||
".........##.....",
|
||||
"...#.....#####..",
|
||||
"...#.....#####..",
|
||||
"...##...########",
|
||||
"...########.....",
|
||||
"...#######......",
|
||||
"...######.......",
|
||||
"..#########.....",
|
||||
".#############..",
|
||||
"#####...........",
|
||||
"###.............",
|
||||
"................",
|
||||
"................"};
|
21
pics/type_8e.xpm
Normal file
21
pics/type_8e.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"..............##",
|
||||
".............###",
|
||||
".....##.....####",
|
||||
"....##......##..",
|
||||
"...##.......##..",
|
||||
"..##...######...",
|
||||
".##.#########...",
|
||||
"##.###..####....",
|
||||
"...#...#######..",
|
||||
"...#..####......",
|
||||
"...######.......",
|
||||
"...####.##......",
|
||||
"........#.......",
|
||||
"................"};
|
21
pics/type_8o.xpm
Normal file
21
pics/type_8o.xpm
Normal file
@ -0,0 +1,21 @@
|
||||
/* XPM */
|
||||
static char *flier[]={
|
||||
"16 16 2 1",
|
||||
"# c #000000",
|
||||
". c none",
|
||||
"................",
|
||||
"................",
|
||||
"..............##",
|
||||
".............###",
|
||||
".....##.....####",
|
||||
"....##......##..",
|
||||
"...##.......##..",
|
||||
"..##...######...",
|
||||
".##.#########...",
|
||||
"##.###..####....",
|
||||
"...#...#######..",
|
||||
"...#..####......",
|
||||
"...######.......",
|
||||
"...####.##......",
|
||||
"........#.......",
|
||||
"................"};
|
51
pushbuttonmod.cpp
Normal file
51
pushbuttonmod.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include "pushbuttonmod.h"
|
||||
|
||||
pushbuttonmod::pushbuttonmod(QWidget *parent) :
|
||||
QPushButton(parent)
|
||||
{
|
||||
F11disabled = false;
|
||||
}
|
||||
|
||||
bool pushbuttonmod::isF11disabled()
|
||||
{
|
||||
return F11disabled;
|
||||
}
|
||||
|
||||
void pushbuttonmod::setF11disabled(bool fl)
|
||||
{
|
||||
F11disabled = fl;
|
||||
}
|
||||
|
||||
void pushbuttonmod::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
int c = e->key();
|
||||
bool fl = true;
|
||||
|
||||
// qDebug("%x", c);
|
||||
|
||||
if ((c==Qt::Key_F11)&& !F11disabled)
|
||||
{
|
||||
this->animateClick();
|
||||
}
|
||||
|
||||
if ((uid==0x13)&&(c==Qt::Key_Left)) fl = false;
|
||||
if ((uid==0x13)&&(c==Qt::Key_Up)) fl = false;
|
||||
|
||||
if ((uid==0x1e)&&(c==Qt::Key_Right)) fl = false;
|
||||
if ((uid==0x1e)&&(c==Qt::Key_Down)) fl = false;
|
||||
// if ((c==Qt::Key_Tab)) fl = false;
|
||||
|
||||
|
||||
if ((uid==0x11)&&(c==Qt::Key_Left)) fl = false;
|
||||
if ((uid==0x11)&&(c==Qt::Key_Right)) fl = false;
|
||||
|
||||
|
||||
|
||||
if (fl) QPushButton::keyPressEvent(e);
|
||||
}
|
||||
|
||||
void pushbuttonmod::focusOutEvent(QFocusEvent *e)
|
||||
{
|
||||
|
||||
QPushButton::focusOutEvent(e);
|
||||
}
|
31
pushbuttonmod.h
Normal file
31
pushbuttonmod.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef PUSHBUTTONMOD_H
|
||||
#define PUSHBUTTONMOD_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QKeyEvent>
|
||||
|
||||
class pushbuttonmod : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit pushbuttonmod(QWidget *parent = 0);
|
||||
|
||||
int uid;
|
||||
|
||||
bool isF11disabled();
|
||||
void setF11disabled(bool fl);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
// void focusInEvent(QFocusEvent *e);
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
bool F11disabled;
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
||||
|
||||
#endif // PUSHBUTTONMOD_H
|
22
settings.txt
Normal file
22
settings.txt
Normal file
@ -0,0 +1,22 @@
|
||||
1
|
||||
0
|
||||
15 760 20 5
|
||||
0712081016051266016612080265141002671612036918140471201603732319027425210174252101742521017425210174252101742521017425217425217425217425217425217425217628222325
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
6 0 500000 600000 100
|
||||
6 0 450000 650000 0
|
||||
0 250 0 0 3
|
||||
0
|
||||
29 0 21 0
|
||||
0 0 0 0
|
||||
30
|
||||
60
|
||||
0
|
||||
0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0
|
||||
0
|
||||
0
|
||||
130 170 0
|
28
showcrc.cpp
Normal file
28
showcrc.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "showcrc.h"
|
||||
#include "ui_showcrc.h"
|
||||
|
||||
showCRC::showCRC(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::showCRC)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
}
|
||||
|
||||
showCRC::~showCRC()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void showCRC::on_pushButton_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void showCRC::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
26
showcrc.h
Normal file
26
showcrc.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef SHOWCRC_H
|
||||
#define SHOWCRC_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class showCRC;
|
||||
}
|
||||
|
||||
class showCRC : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit showCRC(QWidget *parent = 0);
|
||||
~showCRC();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
private:
|
||||
Ui::showCRC *ui;
|
||||
};
|
||||
|
||||
#endif // SHOWCRC_H
|
52
showcrc.ui
Normal file
52
showcrc.ui
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>showCRC</class>
|
||||
<widget class="QDialog" name="showCRC">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>255</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Контрольная сумма</string>
|
||||
</property>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>70</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ОК</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>30</y>
|
||||
<width>201</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Контрольная сумма ПО: ХХХХХХХХ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
51
table2z.cpp
Normal file
51
table2z.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include "table2z.h"
|
||||
#include "ui_table2z.h"
|
||||
|
||||
#include "vvod2z.h"
|
||||
|
||||
table2Z::table2Z(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::table2Z)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
// çàãðóçêà òåêñòà â ïåðåîãîâîðíóþ òàáëèöó èç ôàéëà-ðåñóðñà
|
||||
ui->tableWidget->setColumnCount(10);
|
||||
ui->tableWidget->setRowCount(10);
|
||||
QStringList nums;
|
||||
for (int i=0; i<10; i++) nums << QString::number(i);
|
||||
ui->tableWidget->setHorizontalHeaderLabels(nums);
|
||||
|
||||
ui->tableWidget->setVerticalHeaderLabels(nums);
|
||||
|
||||
char buf[1024];
|
||||
QFile file(":/new/table2z/text.txt");
|
||||
if (file.open(QFile::ReadOnly))
|
||||
{
|
||||
for (int i=0; i<10; i++)
|
||||
for (int j=0; j<10; j++)
|
||||
{
|
||||
file.readLine(buf, sizeof(buf));
|
||||
QTableWidgetItem *newItem = new QTableWidgetItem(QString::fromLocal8Bit(buf));
|
||||
ui->tableWidget->setItem(i,j, newItem);
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
ui->lineEdit->setFocus();
|
||||
}
|
||||
|
||||
table2Z::~table2Z()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void table2Z::on_lineEdit_returnPressed()
|
||||
{
|
||||
QString st = ui->lineEdit->text();
|
||||
if (!st.isEmpty()) ((vvod2z*)parent())->curCode = st.toInt();
|
||||
((vvod2z*)parent())->msUpdate();
|
||||
close();
|
||||
}
|
26
table2z.h
Normal file
26
table2z.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef TABLE2Z_H
|
||||
#define TABLE2Z_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class table2Z;
|
||||
}
|
||||
|
||||
class table2Z : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit table2Z(QWidget *parent = 0);
|
||||
~table2Z();
|
||||
|
||||
|
||||
private slots:
|
||||
void on_lineEdit_returnPressed();
|
||||
|
||||
private:
|
||||
Ui::table2Z *ui;
|
||||
};
|
||||
|
||||
#endif // TABLE2Z_H
|
5
table2z.qrc
Normal file
5
table2z.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/new">
|
||||
<file>table2z/text.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
73
table2z.ui
Normal file
73
table2z.ui
Normal file
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>table2Z</class>
|
||||
<widget class="QDialog" name="table2Z">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>667</width>
|
||||
<height>482</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод команды 2Z</string>
|
||||
</property>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>663</width>
|
||||
<height>453</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>6</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideNone</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>64</number>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderDefaultSectionSize">
|
||||
<number>42</number>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>570</x>
|
||||
<y>460</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>520</x>
|
||||
<y>464</y>
|
||||
<width>46</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Команда</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
100
table2z/text.txt
Normal file
100
table2z/text.txt
Normal file
@ -0,0 +1,100 @@
|
||||
Отмена предыдущей команды по цели
|
||||
Телефонный разговор по цели
|
||||
Уточнить характеристики ВО
|
||||
Выдать характеристики ВО
|
||||
Обеспечить качественное сопровождение цели
|
||||
Подготовиться к маршу
|
||||
Доложить о готовности к маршу
|
||||
Начать движение
|
||||
Доложить о прибытии в район
|
||||
Доложить о принятии ПР
|
||||
Изменить высоту ВО
|
||||
Цель уничтожить
|
||||
Уточнить гос. прин. ЦГМИ
|
||||
Выдать положение ТС
|
||||
Выдать БГ и БК
|
||||
Выдать имитир. цель
|
||||
Запрос коорд. РТ
|
||||
Доложить о потерях
|
||||
Представить ОК
|
||||
Доложить результаты БД
|
||||
Цикл стрельбы закончен
|
||||
Передать данные по цели
|
||||
Запрет стрельбы по цели
|
||||
Прекратить передачу данных по цели
|
||||
Запрет пуска ракет
|
||||
Самост. стрельба разрешена
|
||||
Самост. стрельба запрещена
|
||||
Уничтожить ВП в ответ. простр.
|
||||
Уничтожить ВП
|
||||
Сцена
|
||||
Команду получил
|
||||
Команду не выполнил
|
||||
Включить ОК
|
||||
Безусл. запрет стрельбы
|
||||
Доложить о готовности к работе
|
||||
К работе готов
|
||||
Усилить визуальную разведку
|
||||
Против. применяет помехи
|
||||
Против. применяет ПРР
|
||||
Сцена 3
|
||||
Команду выполнил
|
||||
Пуск по цели
|
||||
Выключить ОК
|
||||
Цель пропущена
|
||||
|
||||
Цель поражена
|
||||
|
||||
ЦУ выдано на боевые средства
|
||||
Цель сопров. авт.
|
||||
Сцена 4
|
||||
Провести ФК
|
||||
Всем готовность N1
|
||||
Всем готовность N2
|
||||
Всем готовность N3
|
||||
Всем готовность N4
|
||||
Отказ от ЦУ по цели
|
||||
Авиация в корид. пролета
|
||||
ИА перед зоной БД
|
||||
ИА за зоной БД
|
||||
Сцена 5
|
||||
ФК провел боеготовн.
|
||||
Готовность N1 ДС
|
||||
Готовность N2 ДС
|
||||
Готовность N3 ДС
|
||||
Готовность N4 ДС
|
||||
Проверка
|
||||
КРУ(сектор зона) огн. по Н
|
||||
Взлет авиации противника
|
||||
ИУ авиации противника.
|
||||
|
||||
РОН
|
||||
Готовность N1 Деж. РЛС
|
||||
Готовность N2 Деж. РЛС
|
||||
Готовность N3 Деж. РЛС
|
||||
Готовность N4 Деж. РЛС
|
||||
РЛС работает в ответ. секторе
|
||||
РЛС прек. раб. в ответ. секторе
|
||||
КРУ(сектор) без огр. по Н
|
||||
|
||||
|
||||
Выйти насвязь по тел.
|
||||
Готовность N1 РЛС МБ
|
||||
Готовность N2 РЛС МБ
|
||||
Готовность N3 РЛС МБ
|
||||
Готовность N4 РЛС МБ
|
||||
Включить высотомер
|
||||
Готовность N1 без вкл. высотом.
|
||||
|
||||
КРУ(зона) без огр. по высоте
|
||||
|
||||
Выйти на связь по радио
|
||||
Готовность N1 РЛС ДМВ
|
||||
Готовность N2 РЛС ДМВ
|
||||
Готовность N3 РЛС ДМВ
|
||||
Готовность N4 РЛС ДМВ
|
||||
Выдать ВС
|
||||
Прекратить выдачу ВО
|
||||
|
||||
|
||||
Отмена команды
|
38
tempzar.cpp
Normal file
38
tempzar.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
#include "tempzar.h"
|
||||
#include "ui_tempzar.h"
|
||||
|
||||
tempZar::tempZar(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::tempZar)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
ZAtempZar = 0;
|
||||
ZAtempZar = (((Widget*)parent)->ZAtempZar);
|
||||
ui->lineEdit->setText(QString::number(ZAtempZar));
|
||||
}
|
||||
|
||||
tempZar::~tempZar()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void tempZar::on_pushButton_clicked()
|
||||
{
|
||||
ZAtempZar = ui->lineEdit->text().toInt();
|
||||
((Widget*)parent())->ZAtempZar = ZAtempZar;
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
||||
|
||||
void tempZar::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void tempZar::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
e->accept();
|
||||
}
|
29
tempzar.h
Normal file
29
tempzar.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef TEMPZAR_H
|
||||
#define TEMPZAR_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class tempZar;
|
||||
}
|
||||
|
||||
class tempZar : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit tempZar(QWidget *parent = 0);
|
||||
~tempZar();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
void closeEvent(QCloseEvent *e);
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
private:
|
||||
Ui::tempZar *ui;
|
||||
int ZAtempZar;
|
||||
};
|
||||
|
||||
#endif // TEMPZAR_H
|
104
tempzar.ui
Normal file
104
tempzar.ui
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>tempZar</class>
|
||||
<widget class="QDialog" name="tempZar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>221</width>
|
||||
<height>154</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод температуры заряда</string>
|
||||
</property>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>201</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>17</x>
|
||||
<y>20</y>
|
||||
<width>101</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Температура</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>26</y>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>158</x>
|
||||
<y>27</y>
|
||||
<width>21</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>°С</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>110</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
37
texit.cpp
Normal file
37
texit.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
#include "texit.h"
|
||||
#include "ui_texit.h"
|
||||
#include "widget.h"
|
||||
#include <QTimer>
|
||||
|
||||
Texit::Texit(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::Texit)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
}
|
||||
|
||||
Texit::~Texit()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Texit::on_pushButton_2_clicked()
|
||||
{
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
void Texit::on_pushButton_clicked()
|
||||
{
|
||||
((Widget*)parent())->writeFile();
|
||||
QTimer::singleShot(500, (Widget*)parent(), SLOT(MyClose()));
|
||||
close();
|
||||
}
|
||||
|
||||
void Texit::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
e->accept();
|
||||
}
|
27
texit.h
Normal file
27
texit.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef TEXIT_H
|
||||
#define TEXIT_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class Texit;
|
||||
}
|
||||
|
||||
class Texit : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Texit(QWidget *parent = 0);
|
||||
~Texit();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *e);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::Texit *ui;
|
||||
};
|
||||
|
||||
#endif // TEXIT_H
|
65
texit.ui
Normal file
65
texit.ui
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Texit</class>
|
||||
<widget class="QDialog" name="Texit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>262</width>
|
||||
<height>138</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Завершение работы</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>40</y>
|
||||
<width>221</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Выгрузить систему?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>90</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Да</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>90</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Нет</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
52
vvod2z.cpp
Normal file
52
vvod2z.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
#include "vvod2z.h"
|
||||
#include "ui_vvod2z.h"
|
||||
|
||||
vvod2z::vvod2z(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvod2z)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
ui->lineEdit_2->setFocus();
|
||||
|
||||
}
|
||||
|
||||
vvod2z::~vvod2z()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvod2z::on_pushButton_3_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvod2z::on_pushButton_clicked()
|
||||
{
|
||||
curCode = ui->lineEdit_2->text().toInt();
|
||||
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
void vvod2z::on_pushButton_2_clicked()
|
||||
{
|
||||
t2z = new table2Z(this);
|
||||
t2z->show();
|
||||
|
||||
}
|
||||
|
||||
void vvod2z::msUpdate()
|
||||
{
|
||||
ui->lineEdit_2->setText(QString::number(curCode));
|
||||
|
||||
}
|
||||
|
||||
void vvod2z::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
38
vvod2z.h
Normal file
38
vvod2z.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef VVOD2Z_H
|
||||
#define VVOD2Z_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "widget.h"
|
||||
#include "table2z.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvod2z;
|
||||
}
|
||||
|
||||
class vvod2z : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvod2z(QWidget *parent = 0);
|
||||
~vvod2z();
|
||||
|
||||
int curCode;
|
||||
table2Z *t2z;
|
||||
public slots:
|
||||
void msUpdate();
|
||||
private slots:
|
||||
void on_pushButton_3_clicked();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
private:
|
||||
Ui::vvod2z *ui;
|
||||
};
|
||||
|
||||
#endif // VVOD2Z_H
|
221
vvod2z.ui
Normal file
221
vvod2z.ui
Normal file
@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>vvod2z</class>
|
||||
<widget class="QWidget" name="vvod2z">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>238</width>
|
||||
<height>232</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод ДКО</string>
|
||||
</property>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>85</x>
|
||||
<y>190</y>
|
||||
<width>61</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Текст</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>211</width>
|
||||
<height>56</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>24</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Код абонента</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>20</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>190</y>
|
||||
<width>61</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>211</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Ввод координат точки высветки</string>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>20</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>24</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Команда</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>50</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>54</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Xтв</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>80</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>84</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Yтв</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>168</x>
|
||||
<y>54</y>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>168</x>
|
||||
<y>84</y>
|
||||
<width>21</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>190</y>
|
||||
<width>61</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
37
vvodautozadef.cpp
Normal file
37
vvodautozadef.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
#include "vvodautozadef.h"
|
||||
#include "ui_vvodautozadef.h"
|
||||
|
||||
vvodAutoZAdef::vvodAutoZAdef(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvodAutoZAdef)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
ui->checkBox->setChecked(((Widget*)parent)->autoZAdefault);
|
||||
}
|
||||
|
||||
vvodAutoZAdef::~vvodAutoZAdef()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvodAutoZAdef::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodAutoZAdef::on_pushButton_clicked()
|
||||
{
|
||||
((Widget*)parent())->autoZAdefault= ui->checkBox->isChecked();
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodAutoZAdef::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
28
vvodautozadef.h
Normal file
28
vvodautozadef.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef VVODAUTOZADEF_H
|
||||
#define VVODAUTOZADEF_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvodAutoZAdef;
|
||||
}
|
||||
|
||||
class vvodAutoZAdef : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvodAutoZAdef(QWidget *parent = 0);
|
||||
~vvodAutoZAdef();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::vvodAutoZAdef *ui;
|
||||
};
|
||||
|
||||
#endif // VVODAUTOZADEF_H
|
122
vvodautozadef.ui
Normal file
122
vvodautozadef.ui
Normal file
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>vvodAutoZAdef</class>
|
||||
<widget class="QDialog" name="vvodAutoZAdef">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>237</width>
|
||||
<height>129</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Установка ЗА в исходное</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>221</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="checkboxmod" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>30</y>
|
||||
<width>21</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>161</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Включение режима</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>автоматической</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>установки ЗА в исходное</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>100</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>checkboxmod</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header location="global">checkboxmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
59
vvodbk.cpp
Normal file
59
vvodbk.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
#include "vvodbk.h"
|
||||
#include "ui_vvodbk.h"
|
||||
|
||||
|
||||
VvodBK::VvodBK(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::VvodBK)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
int t[5];
|
||||
for (int i=0;i<5; i++) t[i]=(((Widget*)parent)->BK[i]);
|
||||
|
||||
ui->lineEdit->setText(QString::number(t[0]));
|
||||
ui->lineEdit_2->setText(QString::number(t[1]));
|
||||
ui->lineEdit_3->setText(QString::number(t[2]));
|
||||
ui->lineEdit_4->setText(QString::number(t[3]));
|
||||
ui->lineEdit_5->setText(QString::number(t[4]));
|
||||
|
||||
}
|
||||
|
||||
VvodBK::~VvodBK()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void VvodBK::on_pushButton_2_clicked()
|
||||
{
|
||||
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void VvodBK::on_pushButton_clicked()
|
||||
{
|
||||
int t[5];
|
||||
t[0] = ui->lineEdit->text().toInt();
|
||||
t[1] = ui->lineEdit_2->text().toInt();
|
||||
t[2] = ui->lineEdit_3->text().toInt();
|
||||
t[3] = ui->lineEdit_4->text().toInt();
|
||||
t[4] = ui->lineEdit_5->text().toInt();
|
||||
|
||||
for (int i=0;i<5; i++) ((Widget*)parent())->BK[i]=t[i];
|
||||
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
|
||||
}
|
||||
|
||||
void VvodBK::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
33
vvodbk.h
Normal file
33
vvodbk.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef VVODBK_H
|
||||
#define VVODBK_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class VvodBK;
|
||||
}
|
||||
|
||||
class VvodBK : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit VvodBK(QWidget *parent = 0);
|
||||
~VvodBK();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Ui::VvodBK *ui;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // VVODBK_H
|
147
vvodbk.ui
Normal file
147
vvodbk.ui
Normal file
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>VvodBK</class>
|
||||
<widget class="QDialog" name="VvodBK">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>200</width>
|
||||
<height>219</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод БК</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>181</width>
|
||||
<height>161</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>164</width>
|
||||
<height>126</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>1 ствол (нижн.лев.)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>2 ствол (верх.лев.)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>3 ствол (нижн.прав.)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>4 ствол (верх.лев.)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Количество ракет</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>180</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
37
vvoddko.cpp
Normal file
37
vvoddko.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
#include "vvoddko.h"
|
||||
#include "ui_vvoddko.h"
|
||||
|
||||
vvodDKO::vvodDKO(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvodDKO)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
ui->lineEdit_2->setFocus();
|
||||
}
|
||||
|
||||
vvodDKO::~vvodDKO()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvodDKO::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodDKO::on_pushButton_clicked()
|
||||
{
|
||||
// send
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodDKO::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
28
vvoddko.h
Normal file
28
vvoddko.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef VVODDKO_H
|
||||
#define VVODDKO_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvodDKO;
|
||||
}
|
||||
|
||||
class vvodDKO : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvodDKO(QWidget *parent = 0);
|
||||
~vvodDKO();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::vvodDKO *ui;
|
||||
};
|
||||
|
||||
#endif // VVODDKO_H
|
208
vvoddko.ui
Normal file
208
vvoddko.ui
Normal file
@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>vvodDKO</class>
|
||||
<widget class="QDialog" name="vvodDKO">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>230</width>
|
||||
<height>223</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Ввод ДКО</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>211</width>
|
||||
<height>56</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>24</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Код абонента</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>20</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>211</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Ввод координат точки высветки</string>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>20</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>24</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Команда</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>50</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>54</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Xтв</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>80</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>84</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Yтв</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>168</x>
|
||||
<y>54</y>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>168</x>
|
||||
<y>84</y>
|
||||
<width>21</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>190</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>190</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
39
vvodkcu.cpp
Normal file
39
vvodkcu.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
#include "vvodkcu.h"
|
||||
#include "ui_vvodkcu.h"
|
||||
|
||||
vvodKCU::vvodKCU(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvodKCU)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
}
|
||||
|
||||
vvodKCU::~vvodKCU()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvodKCU::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodKCU::on_pushButton_clicked()
|
||||
{
|
||||
int NC = ui->lineEdit->text().toInt();
|
||||
// send DCU
|
||||
Widget *w = (Widget *)parent();
|
||||
|
||||
w->msVvodCU_N2(NC);
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodKCU::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
28
vvodkcu.h
Normal file
28
vvodkcu.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef VVODKCU_H
|
||||
#define VVODKCU_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvodKCU;
|
||||
}
|
||||
|
||||
class vvodKCU : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvodKCU(QWidget *parent = 0);
|
||||
~vvodKCU();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::vvodKCU *ui;
|
||||
};
|
||||
|
||||
#endif // VVODKCU_H
|
91
vvodkcu.ui
Normal file
91
vvodkcu.ui
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>vvodKCU</class>
|
||||
<widget class="QDialog" name="vvodKCU">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>228</width>
|
||||
<height>108</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ЦУ_N</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>201</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>18</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Номер цели</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>106</x>
|
||||
<y>15</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>70</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отмена</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
54
vvodma.cpp
Normal file
54
vvodma.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
#include "vvodma.h"
|
||||
#include "ui_vvodma.h"
|
||||
|
||||
vvodMA::vvodMA(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvodMA)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
|
||||
metAv = ((Widget*)parent)->metAv;
|
||||
|
||||
ui->lineEdit->setText(QString::number(metAv.temp));
|
||||
ui->lineEdit_2->setText(QString::number(metAv.pressure));
|
||||
ui->lineEdit_3->setText(QString::number(metAv.wind));
|
||||
int du = metAv.azim / 100;
|
||||
ui->lineEdit_6->setText(QString::number(du));
|
||||
du = metAv.azim % 100;
|
||||
ui->lineEdit_7->setText(QString::number(du));
|
||||
|
||||
}
|
||||
|
||||
vvodMA::~vvodMA()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvodMA::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodMA::on_pushButton_clicked()
|
||||
{
|
||||
metAv.temp = ui->lineEdit->text().toInt();
|
||||
metAv.pressure = ui->lineEdit_2->text().toInt();
|
||||
metAv.wind = ui->lineEdit_3->text().toInt();
|
||||
int du = ui->lineEdit_6->text().toInt();
|
||||
metAv.azim = du*100 + ui->lineEdit_7->text().toInt();
|
||||
|
||||
((Widget*)parent())->metAv = metAv;
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodMA::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
||||
|
30
vvodma.h
Normal file
30
vvodma.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef VVODMA_H
|
||||
#define VVODMA_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
#include "geo.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvodMA;
|
||||
}
|
||||
|
||||
class vvodMA : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvodMA(QWidget *parent = 0);
|
||||
~vvodMA();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::vvodMA *ui;
|
||||
T_metAv metAv;
|
||||
};
|
||||
|
||||
#endif // VVODMA_H
|
251
vvodma.ui
Normal file
251
vvodma.ui
Normal file
@ -0,0 +1,251 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>vvodMA</class>
|
||||
<widget class="QDialog" name="vvodMA">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>261</width>
|
||||
<height>185</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>261</width>
|
||||
<height>185</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>286</width>
|
||||
<height>213</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Ввод данных по МА</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>241</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>10</y>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Температура воздуха</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>10</y>
|
||||
<width>41</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>°С</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>30</y>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>мм рт.ст.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>141</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Давление</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>30</y>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>50</y>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>м/с</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>141</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Скорость ветра</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>50</y>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>74</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Направление ветра</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>74</y>
|
||||
<width>31</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>74</y>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>74</y>
|
||||
<width>31</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>140</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>140</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отмена</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
244
vvodms.cpp
Normal file
244
vvodms.cpp
Normal file
@ -0,0 +1,244 @@
|
||||
#include "vvodms.h"
|
||||
#include "ui_vvodms.h"
|
||||
|
||||
vvodMs::vvodMs(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvodMs)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
int i;
|
||||
|
||||
for (i=0; i<80; i++) localLE[i] = new QLineEdit(this);
|
||||
for (i=0; i<6; i++)
|
||||
{
|
||||
localLE[i*8] ->setGeometry(30, 140+20*i, 31, 20);
|
||||
localLE[i*8+1]->setGeometry(90, 140+20*i, 31, 20);
|
||||
localLE[i*8+2]->setGeometry(160, 140+20*i, 31, 20);
|
||||
localLE[i*8+3]->setGeometry(220, 140+20*i, 31, 20);
|
||||
localLE[i*8+4]->setGeometry(320, 140+20*i, 31, 20);
|
||||
localLE[i*8+5]->setGeometry(380, 140+20*i, 31, 20);
|
||||
localLE[i*8+6]->setGeometry(440, 140+20*i, 31, 20);
|
||||
localLE[i*8+7]->setGeometry(500, 140+20*i, 31, 20);
|
||||
}
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
localLE[i*8+48] ->setGeometry(30, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+1]->setGeometry(90, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+2]->setGeometry(160, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+3]->setGeometry(220, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+4]->setGeometry(320, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+5]->setGeometry(380, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+6]->setGeometry(440, 280+20*i, 31, 20);
|
||||
localLE[i*8+48+7]->setGeometry(500, 280+20*i, 31, 20);
|
||||
}
|
||||
for (i=76; i<80; i++) localLE[i]->hide();
|
||||
localLE[52]->setEnabled(false);
|
||||
localLE[56]->setEnabled(false);
|
||||
localLE[60]->setEnabled(false);
|
||||
localLE[64]->setEnabled(false);
|
||||
localLE[68]->setEnabled(false);
|
||||
localLE[72]->setEnabled(false);
|
||||
|
||||
|
||||
setTabOrder(ui->lineEdit_6, localLE[0]);
|
||||
for (i=1;i<76;i++) setTabOrder(localLE[i-1], localLE[i]);
|
||||
setTabOrder(localLE[75], ui->lineEdit_103);
|
||||
setTabOrder(ui->lineEdit_103, ui->lineEdit_98);
|
||||
|
||||
int n=0;
|
||||
|
||||
meteoSr = ((Widget*)parent)->metSr;
|
||||
// "ìåòåî-11" ïðîïóñêàåì, íîìåð çîíû
|
||||
ui->lineEdit->setText(meteoSr.mid(0, 2));
|
||||
// äåíü
|
||||
ui->lineEdit_2->setText(meteoSr.mid(2,2));
|
||||
// âðåìÿ
|
||||
n = meteoSr.mid(4, 3).toInt();
|
||||
ui->lineEdit_3->setText(QString::number(n)+"0");
|
||||
// âûñîòà
|
||||
n = meteoSr.mid(7, 4).toInt();
|
||||
ui->lineEdit_4->setText(QString::number(n));
|
||||
// Îòêë. äàâëåíèÿ
|
||||
n = meteoSr.mid(11, 3).toInt();
|
||||
if ( n>499) n = 500 - n;
|
||||
ui->lineEdit_5->setText(QString::number(n));
|
||||
// Îòêë. òåìïåðàòóðû
|
||||
n = meteoSr.mid(14,2).toInt();
|
||||
if (n>49) n = 50-n;
|
||||
ui->lineEdit_6->setText(QString::number(n));
|
||||
// ñòàíäàðòíûé íàáîð: îòêë. äàâëåíèÿ, òåìï, óãîë âåòðà, ñêîð. âåòðà
|
||||
for (i=0; i<13; i++)
|
||||
{
|
||||
localLE[i*4]->setText(meteoSr.mid(16+i*8, 2));
|
||||
n = meteoSr.mid(18+i*8, 2).toInt();
|
||||
if (n>49) n = 50-n;
|
||||
localLE[i*4+1]->setText(QString::number(n));
|
||||
localLE[i*4+2]->setText(meteoSr.mid(20+i*8, 2));
|
||||
localLE[i*4+3]->setText(meteoSr.mid(22+i*8, 2));
|
||||
}
|
||||
// äëÿ âåðõíèõ çîí íåò îòêë. äàâëåíèÿ - ïðèíèìàåòñÿ 1%
|
||||
for (int i=13; i<19; i++)
|
||||
{
|
||||
n = meteoSr.mid(120+(i-13)*6, 2).toInt();
|
||||
if (n>49) n = 50-n;
|
||||
localLE[i*4+1]->setText(QString::number(n));
|
||||
localLE[i*4+2]->setText(meteoSr.mid(122+(i-13)*6, 2));
|
||||
localLE[i*4+3]->setText(meteoSr.mid(124+(i-13)*6, 2));
|
||||
|
||||
}
|
||||
// âûñîòû òåìï. è âåòðîâîãî çîíäèðîâàíèÿ
|
||||
ui->lineEdit_103->setText(meteoSr.right(4).left(2)+"00");
|
||||
ui->lineEdit_98->setText(meteoSr.right(2)+"00");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
vvodMs::~vvodMs()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvodMs::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodMs::on_pushButton_clicked()
|
||||
{
|
||||
QString str;
|
||||
meteoSr.clear();
|
||||
int tmp, tmp1;
|
||||
|
||||
// str.append(QString::fromLocal8Bit("Ìåòåî-11"));
|
||||
// íîìåð ñòàíöèè
|
||||
tmp = ui->lineEdit->text().toInt();
|
||||
if (tmp<0) tmp=0; else if (tmp>99) tmp=99;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// str.append(QString("-"));
|
||||
// äåíü ÷àñ ìèíóòû
|
||||
tmp = ui->lineEdit_2->text().toInt();
|
||||
if (tmp<0) tmp =0; else if (tmp>31) tmp=31;
|
||||
str.append(QString::number(tmp));
|
||||
tmp = ui->lineEdit_3->text().toInt();
|
||||
if (tmp<0) tmp =0 ; else if (tmp>2359) tmp = 2359;
|
||||
tmp1 = tmp / 100;
|
||||
if (tmp1<10) str.append(QString("0"));
|
||||
tmp1 = tmp / 10;
|
||||
str.append(QString::number(tmp1));
|
||||
// str.append(QString("-"));
|
||||
// 3 ãðóïïà
|
||||
tmp = ui->lineEdit_4->text().toInt();
|
||||
if (tmp<0) tmp =0 ; else if (tmp>9999) tmp = 9999;
|
||||
if (tmp<1000) str.append(QString("0"));
|
||||
if (tmp<100) str.append(QString("0"));
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// str.append(QString("-"));
|
||||
//4 ãðóïïà
|
||||
// ìì ðò ñò
|
||||
tmp = ui->lineEdit_5->text().toInt();
|
||||
if (tmp<-99) tmp=-99; else if ( tmp>99) tmp = 99;
|
||||
if (tmp<0) str.append(QString("5")); else str.append(QString("0"));
|
||||
tmp = abs(tmp);
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// òåìïåðàòóðà
|
||||
tmp = ui->lineEdit_6->text().toInt();
|
||||
if (tmp<-49) tmp = -49; else if (tmp>49) tmp = 49;
|
||||
if (tmp<0) tmp = abs(tmp)+50;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// str.append(QString("-"));
|
||||
// 5,6 è ïîñëåäóþùèå
|
||||
|
||||
// QString nS[19] = {"02", "04", "08", "12", "16", "20", "24", "30", "40", "50", "60", "80",
|
||||
// "10", "12", "14", "18", "22", "26", "30"};
|
||||
|
||||
|
||||
for (int i=0; i<13; i++)
|
||||
{
|
||||
// str.append(nS[i]);
|
||||
|
||||
tmp = localLE[i*4]->text().toInt();
|
||||
if (tmp<0) tmp = 0; else if (tmp>99) tmp = 99;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// str.append(QString("-"));
|
||||
|
||||
tmp = localLE[i*4+1]->text().toInt();
|
||||
if (tmp<-49) tmp = -49; else if (tmp>49) tmp = 49;
|
||||
if (tmp<0) tmp = abs(tmp)+50;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
|
||||
tmp = localLE[i*4+2]->text().toInt();
|
||||
if (tmp<0) tmp =0; else if (tmp>59) tmp = 59;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
|
||||
tmp = localLE[i*4+3]->text().toInt();
|
||||
if (tmp<0) tmp = 0; else if (tmp>99) tmp = 99;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// str.append(QString("-"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (int i=13; i<19; i++)
|
||||
{
|
||||
// str.append(nS[i]);
|
||||
// str.append(QString("01"));
|
||||
// str.append(QString("-"));
|
||||
tmp = localLE[i*4+1]->text().toInt();
|
||||
if (tmp<-49) tmp = -49; else if (tmp>49) tmp = 49;
|
||||
if (tmp<0) tmp = abs(tmp)+50;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
|
||||
tmp = localLE[i*4+2]->text().toInt();
|
||||
if (tmp<0) tmp =0; else if (tmp>59) tmp = 59;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
|
||||
tmp = localLE[i*4+3]->text().toInt();
|
||||
if (tmp<0) tmp = 0; else if (tmp>99) tmp = 99;
|
||||
if (tmp<10) str.append(QString("0"));
|
||||
str.append(QString::number(tmp));
|
||||
// str.append(QString("-"));
|
||||
|
||||
}
|
||||
|
||||
// 103 è 98 íà ôîðìå ñòîÿò íå ïî ïîðÿäêó, ïîýòîìó 103 íèæíÿÿ âûñîòà, 98 - âåðõíÿÿ âûñîòà
|
||||
|
||||
tmp = ui->lineEdit_103->text().toInt();
|
||||
if (tmp<0) tmp = 0; else if (tmp>9999) tmp = 9999;
|
||||
tmp = tmp/100;
|
||||
str.append(QString::number(tmp));
|
||||
|
||||
tmp = ui->lineEdit_98->text().toInt();
|
||||
if (tmp<0) tmp = 0; else if (tmp>9999) tmp = 9999;
|
||||
tmp = tmp/100;
|
||||
str.append(QString::number(tmp));
|
||||
|
||||
tmp = str.length();
|
||||
|
||||
((Widget*)parent())->metSr = str;
|
||||
((Widget*)parent())->writeFile();
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodMs::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
32
vvodms.h
Normal file
32
vvodms.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef VVODMS_H
|
||||
#define VVODMS_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLineEdit>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvodMs;
|
||||
}
|
||||
|
||||
class vvodMs : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvodMs(QWidget *parent = 0);
|
||||
~vvodMs();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::vvodMs *ui;
|
||||
QString meteoSr;
|
||||
QLineEdit *localLE[80];
|
||||
|
||||
};
|
||||
|
||||
#endif // VVODMS_H
|
36
vvodready.cpp
Normal file
36
vvodready.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "vvodready.h"
|
||||
#include "ui_vvodready.h"
|
||||
|
||||
vvodReady::vvodReady(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::vvodReady)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
((Widget*)parent)->changeOpenWidget(this);
|
||||
|
||||
ui->checkBox->setChecked(((Widget*)parent)->readyBoegotov);
|
||||
}
|
||||
|
||||
vvodReady::~vvodReady()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void vvodReady::on_pushButton_2_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodReady::on_pushButton_clicked()
|
||||
{
|
||||
((Widget*)parent())->readyBoegotov = ui->checkBox->isChecked();
|
||||
close();
|
||||
}
|
||||
|
||||
void vvodReady::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
((Widget*)parent())->clearOpenWidget();
|
||||
event->accept();
|
||||
}
|
28
vvodready.h
Normal file
28
vvodready.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef VVODREADY_H
|
||||
#define VVODREADY_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "widget.h"
|
||||
|
||||
namespace Ui {
|
||||
class vvodReady;
|
||||
}
|
||||
|
||||
class vvodReady : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit vvodReady(QWidget *parent = 0);
|
||||
~vvodReady();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::vvodReady *ui;
|
||||
};
|
||||
|
||||
#endif // VVODREADY_H
|
96
vvodready.ui
Normal file
96
vvodready.ui
Normal file
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>vvodReady</class>
|
||||
<widget class="QDialog" name="vvodReady">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>208</width>
|
||||
<height>115</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Техническое состояние</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>181</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>20</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Боеготов</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="checkboxmod" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>20</y>
|
||||
<width>16</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ввод</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="pushbuttonmod" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>80</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отказ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>pushbuttonmod</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">pushbuttonmod.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>checkboxmod</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header location="global">checkboxmod.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user