Открыть боковую панель
МОС
Исходные коды
devel
smartcar
Коммиты
6190db19
Коммит
6190db19
создал
Фев 24, 2025
по автору
Коул Милена Ричардовна
Просмотр файлов
clear main and add mainwindow form
владелец
e13f68e7
Изменения
7
Скрыть пробелы
Построчно
Рядом
forms/mainwindow.cpp
0 → 100644
Просмотр файла @
6190db19
#include
"mainwindow.h"
#include
"ui_mainwindow.h"
MainWindow
::
MainWindow
(
QWidget
*
parent
)
:
QMainWindow
(
parent
),
ui
(
new
Ui
::
MainWindow
)
{
ui
->
setupUi
(
this
);
}
MainWindow
::~
MainWindow
()
{
delete
ui
;
}
forms/mainwindow.h
0 → 100644
Просмотр файла @
6190db19
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include
<QMainWindow>
namespace
Ui
{
class
MainWindow
;
}
class
MainWindow
:
public
QMainWindow
{
Q_OBJECT
public:
explicit
MainWindow
(
QWidget
*
parent
=
nullptr
);
~
MainWindow
();
private:
Ui
::
MainWindow
*
ui
;
};
#endif // MAINWINDOW_H
forms/mainwindow.ui
0 → 100644
Просмотр файла @
6190db19
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>MainWindow</class>
<widget name="MainWindow" class="QMainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget name="menubar" class="QMenuBar"/>
<widget name="centralwidget" class="QWidget"/>
<widget name="statusbar" class="QStatusBar"/>
</widget>
<pixmapfunction/>
<connections/>
</ui>
main.cpp
Просмотр файла @
6190db19
...
...
@@ -6,143 +6,76 @@
#include
<qsplashscreen.h>
#include
<qpixmap.h>
#include
<stdio.h>
#include
<QtCore>
#include
"forms/mainwindow.h"
int
main
(
int
argc
,
char
**
argv
)
{
qDebug
(
"Version 20210428
\n
"
);
// printf("start program\n");
QApplication
a
(
argc
,
argv
);
// Vench *w = new Vench(0,0,0,0x00000200);
// Vench *w = new Vench(0,0,0);
//QPixmap zt;
//zt.load("zst.jpg");
// QSplashScreen *splash =
// new QSplashScreen(zt);
// splash->show();
// splash->finish(w);
// delete splash;
//
int
i
;
int
flBlueTooth
;
// flag raboti s ustroistvom BT (==1) (esli raven 0 - to ustroistvo ZeegBee)
int
flKonsol
;
// rabota bez paneley chisto v konsole s ukazannim filom
flKonsol
=
0
;
flBlueTooth
=
0
;
// if (argc>1) if ((argv[1][0] == '-')&&(argv[1][1] == 'b')) {
// printf("Protokol BlueTooth\n");
// flBlueTooth=1 ;
// }
char
name_file
[
20
];
// ima ustroistva
for
(
i
=
0
;
i
<
20
;
i
++
)
name_file
[
i
]
=
0
;
char
katalog
[
20
];
// ima ustroistva
for
(
i
=
0
;
i
<
20
;
i
++
)
katalog
[
i
]
=
0
;
char
port_s
[
20
];
// ima ustroistva
for
(
i
=
0
;
i
<
20
;
i
++
)
port_s
[
i
]
=
0
;
int
fl_port_s
=
0
;
int
fl_kat
=
0
;
// proveraem na vvedennie parametr
for
(
i
=
0
;
i
<
argc
;
i
++
){
if
(
strcmp
(
argv
[
i
],
"-k"
)
==
0
){
if
(
i
<
argc
-
1
){
strcpy
(
katalog
,
argv
[
i
+
1
]);
fl_kat
=
1
;
i
++
;
// printf("%s\n",katalog);
}
else
{
printf
(
"ERROR: katalog
\n
"
);
}
}
if
(
strcmp
(
argv
[
i
],
"-d"
)
==
0
){
if
(
i
<
argc
-
1
){
strcpy
(
port_s
,
argv
[
i
+
1
]);
fl_port_s
=
1
;
i
++
;
// printf("%s\n",katalog);
}
else
{
printf
(
"ERROR:port
\n
"
);
}
}
if
(
strcmp
(
argv
[
i
],
"-b"
)
==
0
){
printf
(
"Protokol BlueTooth
\n
"
);
flBlueTooth
=
1
;
}
if
(
strcmp
(
argv
[
i
],
"-f"
)
==
0
){
flKonsol
=
1
;
printf
(
"Consol mode
\n
"
);
if
(
i
<
argc
-
1
){
strcpy
(
name_file
,
argv
[
i
+
1
]);
fl_port_s
=
1
;
i
++
;
printf
(
"file : %s
\n
"
,
name_file
);
}
else
{
printf
(
"ERROR:file
\n
"
);
}
}
if
(
strcmp
(
argv
[
i
],
"-F"
)
==
0
){
flKonsol
=
2
;
printf
(
"Consol mode
\n
"
);
if
(
i
<
argc
-
1
){
strcpy
(
name_file
,
argv
[
i
+
1
]);
fl_port_s
=
1
;
i
++
;
printf
(
"file : %s
\n
"
,
name_file
);
}
else
{
printf
(
"ERROR:file
\n
"
);
}
}
bool
isBluetoothMode
=
false
;
int
flKonsol
=
0
;
QString
name_file
;
QString
katalog
;
QString
port_s
;
// parse argv
int
i
=
1
;
while
(
i
<
argc
)
{
QString
arg1
=
argv
[
i
];
++
i
;
if
(
arg1
==
"-b"
)
{
printf
(
"BlueTooth Mode
\n
"
);
isBluetoothMode
=
true
;
}
if
(
arg1
==
"-k"
)
if
(
i
<
argc
)
{
katalog
=
argv
[
i
];
++
i
;
}
else
printf
(
"ERROR: katalog
\n
"
);
if
(
arg1
==
"-d"
)
if
(
i
<
argc
)
{
port_s
=
argv
[
i
];
++
i
;
}
else
printf
(
"ERROR:port
\n
"
);
if
(
arg1
==
"-f"
||
arg1
==
"-F"
)
{
if
(
arg1
==
"-f"
)
flKonsol
=
1
;
else
flKonsol
=
2
;
printf
(
"Consol mode
\n
"
);
if
(
i
<
argc
)
{
name_file
=
argv
[
i
];
printf
(
"file : %s
\n
"
,
qPrintable
(
name_file
));
++
i
;
}
else
printf
(
"ERROR:file
\n
"
);
}
}
if
(
!
flKonsol
){
// FormZastav *Zastav;
// Zastav = new FormZastav(0,katalog) ;
// Zastav->exec();
// delete Zastav;
}
Vench
*
w
;
char
*
kt
=
0
;
char
*
prt
=
0
;
if
(
fl_port_s
)
prt
=
port_s
;
if
(
fl_kat
)
w
=
new
Vench
(
0
,
katalog
,
prt
,
flBlueTooth
,
flKonsol
,
name_file
);
else
w
=
new
Vench
(
0
,
kt
,
prt
,
flBlueTooth
,
flKonsol
,
name_file
);
//Vench *w = new Vench(0, katalog, port_s, isBluetoothMode, flKonsol, name_file);
MainWindow
*
w
=
new
MainWindow
();
if
(
!
flKonsol
)
w
->
show
();
a
.
connect
(
&
a
,
SIGNAL
(
lastWindowClosed
()
),
&
a
,
SLOT
(
quit
()
)
);
return
a
.
exec
();
}
smartcar.pro
Просмотр файла @
6190db19
...
...
@@ -26,10 +26,13 @@ QT += xml
#
Input
HEADERS
+=
channel
.
h
define
.
h
formview
.
h
formzastav
.
h
vench
.
h
\
formhlp
.
h
formhlp
.
h
\
forms
/
mainwindow
.
h
FORMS
+=
vench
.
ui
\
formhlp
.
ui
formhlp
.
ui
\
forms
/
mainwindow
.
ui
SOURCES
+=
channel
.
cpp
\
forms
/
mainwindow
.
cpp
\
formview
.
cpp
\
formzastav
.
cpp
\
main
.
cpp
\
...
...
vench.cpp
Просмотр файла @
6190db19
...
...
@@ -176,20 +176,10 @@ void Vench::DatKas(int num){//0 - right 1 - left
//Vench::Vench(QWidget* parent):QDialog( parent,Qt::WindowMinMaxButtonsHint|Qt::WindowSystemMenuHint )
Vench::Vench(QWidget* parent,
char * kat, char* prt, int fBT
, int fKon,
char *
nf):QDialog( parent,Qt::Window|Qt::WindowSystemMenuHint|Qt::WindowMinMaxButtonsHint|Qt::WindowCloseButtonHint),
Vench::Vench(QWidget* parent,
QString kat, QString prt, bool isBluetoothMode
, int fKon,
QString
nf):QDialog( parent,Qt::Window|Qt::WindowSystemMenuHint|Qt::WindowMinMaxButtonsHint|Qt::WindowCloseButtonHint),
ui(new Ui::Vench)
{
// if ( !name ) setName( "Vench" );
// if (fKon == 1){
// this->setVisible(false);
// }
flBlueTooth =0;
flBlueTooth =fBT;
fl_bluetooth = isBluetoothMode;
fl_altlin=0;
...
...
@@ -197,7 +187,6 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
QTextCodec::setCodecForTr(QTextCodec::codecForName ("Windows-1251"));
#endif
ui->setupUi(this);
//this->setGeometry( QRect( 0, 0, 860, 735 ) );
ui->stackedWidget->hide();
mSleep(100);
...
...
@@ -207,9 +196,6 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
ui->BCar_2->setFont(ft);
ui->BCar_1->setFont(ft);
// setMinimumSize( QSize( 600, 370 ) );
// setMaximumSize( QSize( 600, 370 ) );
setAcceptDrops( false );
setSizeGripEnabled( false );
setModal( false );
...
...
@@ -217,15 +203,11 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
timer = new QTimer(this);
tabWidget2 = new QTabWidget( this );
// tabWidget2->setGeometry( QRect( 10, 0, 580, 370 ) );
tabWidget2->hide();
tab = new QWidget( tabWidget2 );
// tab_4 = new QWidget( tabWidget2 );
// tab_2 = new QWidget( tabWidget2 );
tab_3 = new QWidget( tabWidget2 );
tab_5 = new QWidget( tabWidget2 );
tab_6 = new QWidget( tabWidget2 );
...
...
@@ -286,30 +268,6 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
QPalette pl(Qt::lightGray,Qt::lightGray);
pl.setColor(QPalette::Base,Qt::lightGray);
//m TLabLeftDat = new QTextEdit( trUtf8("Датчик\nкасания") ,tab );
// TLabLeftDat->setGeometry( QRect(265, 270, 60, 40 ) );
//m TLabLeftDat->setGeometry( QRect(90, 270, 85, 50 ) );
//m TLabLeftDat->setPalette(pl);
// TLabLeftDat->setReadOnly( true );
//m TLabRightDat = new QTextEdit( trUtf8("Датчик\nкасания") ,tab );
//m TLabRightDat->setGeometry( QRect(260, 270, 85, 50 ) );
//m TLabRightDat->setPalette(pl);
//m TLabRightDat->setReadOnly( true );
// ������ ���������� �� ���. ������� - ������������ (��� ���� ����
// TLabAns_lab = new QLabel( trUtf8("Статус устройства") ,tab_2 );
// TLabAns_lab->setGeometry( QRect(40, 100, 300, 20 ) );
// TLabAns = new QLineEdit( ans1,tab_2 );
// TLabAns->setGeometry( QRect(40, 120, 300, 20 ) );
// end ������ ���������� �� ���. ������� - ������������ (��� ���� ����
// ������ ����
TextLabel2_3 = new QLabel( trUtf8("Команда для устройства") ,tab);
TextLabel2_3->setGeometry( QRect( 40, 530, 200, 20 ) );
...
...
@@ -333,47 +291,33 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
TLabAnsFirst = new QLineEdit( ans1,tab);
TLabAnsFirst->setGeometry( QRect(40, 75, 300, 20 ) );
pl_ans_ust = new QPalette(Qt::red,Qt::red);
// QPalette pl(Qt::red,Qt::red);
pl.setColor(QPalette::Base,Qt::red);
// TLabAns->setPalette(pl);
// TLabAns->setReadOnly( true );
TLabAnsFirst->setPalette(pl);
TLabAnsFirst->setReadOnly( true );
if (ui->TLabAnsFirst_n) {
// ui->TLabAnsFirst_n->setPalette(*pl_ans_ust);
ui->TLabAnsFirst_n->setPalette(pl);
ui->TLabAnsFirst_n->setText(ans1);
}
// TextLabel2 = new QLabel( "TextLabel2",this );
TextLabel2 = new QLabel( "",tab );
TextLabel2->setGeometry( QRect( 40, 10, 200, 20 ) );
TextLabel2->setVisible(false);
SpActDatch = new QComboBox(tab);
// SpActDatch->activated( "SpActDatch" );
SpActDatch->setGeometry( QRect( 40, 30, 250, 22 ) );
SpActDatch->setVisible(false);
// SpActDatch->setRootModelIndex(this);
// TextLabel2_2 = new QLabel( "TextLabel2_2" ,this);
TextLabel2_2 = new QLabel( "" ,tab);
TextLabel2_2->setGeometry( QRect( 40, 10, 200, 20 ) );
// checkKumir = new QCheckBox( "checkKumir",this );
checkKumir = new QCheckBox( "",tab );
checkKumir->setGeometry( QRect( 460, 520, 180, 22 ) );
checkKumir->setChecked( true );
// checkLog = new QCheckBox( "checkLog",this );
checkLog = new QCheckBox( "",tab );
checkLog->setGeometry( QRect( 460, 540, 160, 22 ) );
checkLog->setChecked( false );
// checkCicl = new QCheckBox("checkCicl",this );
checkCicl = new QCheckBox("",tab );
checkCicl->setGeometry( QRect( 460, 560, 160, 22 ) );
checkCicl->setChecked( false );
...
...
@@ -406,16 +350,13 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BDiscrImp = new QPushButton( trUtf8("Сменить") ,tab);
BDiscrImp->setGeometry( QRect( 460, 160, 90, 30 ) );
// BDiscrImp->hide();//likvidiruem zadanie kol-va imp dla dsikret digenia
DiscrImpE = new QLineEdit( "10",tab );
DiscrImpE->setEnabled( true );
DiscrImpE->setGeometry( QRect( 400, 165, 50, 22 ) );
// DiscrImpE->hide();//likvidiruem zadanie kol-va imp dla dsikret digenia
TextLabel6 = new QLabel( trUtf8("Имп"),tab );
TextLabel6->setGeometry( QRect( 355, 165, 30, 20 ) );
// TextLabel6->hide();//likvidiruem zadanie kol-va imp dla dsikret digenia
TextLabelSpeed = new QLabel( trUtf8("Скорость"),tab );
TextLabelSpeed->setGeometry( QRect( 355, 235, 70, 20 ) );
...
...
@@ -442,14 +383,12 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BShift = new QPushButton( "BShift" ,tab);
BShift->setGeometry( QRect( 10, 300, 90, 29 ) );
// BShift->setToggleButton( true );
// BShift->setFlat( false );
BShift->setCheckable( true );
BShift->setVisible( false );
BStop = new QPushButton( "BStop" ,tab);
BStop->setGeometry( QRect( 360, 300, 60, 29 ) );
// BStop->setToggleButton( false );
BLight = new QPushButton( "BLight" ,tab);
BLight->setGeometry( QRect( 20, 150, 50, 29 ) );
...
...
@@ -460,7 +399,6 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BAntiSleep = new QPushButton( "BAntiSleep" ,tab);
BAntiSleep->setGeometry( QRect( 430, 70, 104, 29 ) );
// checkAll = new QCheckBox( "checkAll" ,this);
checkAll = new QCheckBox( "" ,tab);
checkAll->setGeometry( QRect( 355, 110, 140, 22 ) );
checkAll->setChecked( false );
...
...
@@ -477,7 +415,6 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BPokazProgr = new QPushButton( trUtf8("Программа") ,tab);
BPokazProgr->setGeometry( QRect( 120, 615, 95, 29 ) );
//BPokazProgr->setCheckable( true );
BPlay = new QPushButton( trUtf8("Поехали") ,tab);
BPlay->setGeometry( QRect( 230, 615, 95, 29 ) );
...
...
@@ -485,16 +422,13 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BProdol = new QPushButton( trUtf8("Продолжить") ,tab);
BProdol->setGeometry( QRect( 335, 615, 95, 29 ) );
//BPlay->setCheckable( true );
BLog = new QPushButton( trUtf8("LOG-файл") ,tab);
BLog->setGeometry( QRect( 460, 615, 95, 29 ) );
//BPokazProgr->setCheckable( true );
BParam = new QPushButton( trUtf8("Параметры") ,tab);
BParam->setGeometry( QRect( 460, 585, 95, 29 ) );
//BPokazProgr->setCheckable( true );
BDim = new QPushButton( tr("�������������") ,tab_3);
...
...
@@ -538,7 +472,6 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
LbEn->setGeometry( QRect( 280, 180, 20, 46 ) );
BTemp = new QPushButton( tr("�����������,\n ������������") ,tab_3);
// BTemp = new QPushButton( trUtf8("Температура") ,tab_3);
BTemp->setCheckable( true );
BTemp->setGeometry( QRect( 20, 60, 190, 46 ) );
...
...
@@ -557,12 +490,10 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BGrph = new QPushButton( trUtf8("График температуры") ,tab_3);
BGrph->setCheckable( true );
BGrph->setGeometry( QRect( 20, 110, 190, 26 ) );
// BShift->setToggleButton( true);
BGrphE = new QPushButton( trUtf8("График энергии") ,tab_3);
BGrphE->setCheckable( true );
BGrphE->setGeometry( QRect( 20, 230, 190, 26 ) );
// BShift->setToggleButton( true );
BGrphB = new QPushButton( trUtf8("График давления") ,tab_3);
BGrphB->setGeometry( QRect( 320, 230, 190, 26 ) );
...
...
@@ -573,15 +504,10 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
BGrphVl->setCheckable( true );
// BRezult = new QPushButton( trUtf8("� езультаты") ,tab_3); \xd0
// BRezult = new QPushButton( trUtf8("\xd0\xa0езультаты (температура)") ,tab_3);
BRezult = new QPushButton( trUtf8("\xd0\xa0езультаты ") ,tab_3);
BRezult->setGeometry( QRect( 20, 310, 190, 26 ) );
// BRezultE = new QPushButton( trUtf8("\xd0\xa0езультаты (энергия)") ,tab_3);
// BRezultE->setGeometry( QRect( 220, 256, 190, 26 ) );
checkVibrUst = new QCheckBox( "" ,tab);
checkVibrUst->setGeometry( QRect( 50, 450, 260, 22 ) );
checkVibrUst->setChecked( false );
...
...
@@ -769,14 +695,12 @@ Vench::Vench(QWidget* parent,char * kat, char* prt, int fBT, int fKon,char * nf)
fl_kat=0;
fl_port_s=0;
QString mkat(kat);
if (mkat!=""){
if (!kat.isEmpty()){
SetKatalog(kat);
// qDebug("EEEEEEEEE\n");
}
QString mprt(prt);
if (mprt!=""){
if (!prt.isEmpty()){
SetPort(prt);
// qDebug("EEEEEEEEE\n");
}
...
...
@@ -1769,7 +1693,7 @@ void Vench::ProcessTimer()
}
mSleep(3);
if (!fl
B
lue
T
ooth){
if (!fl
_b
lue
t
ooth){
SendVklAPI();
SendVklNP();
SendZaprosI();
...
...
@@ -4000,7 +3924,7 @@ void Vench::keyPressEvent( QKeyEvent *e )
case 87://up
// printf("Kp=%d\n",kp);
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
on_BUp_B_pressed();
break;
}
...
...
@@ -4039,7 +3963,7 @@ void Vench::keyPressEvent( QKeyEvent *e )
break;
// case 16777237://down
case 83://down
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
qDebug("BT:down\n");
on_BDown_B_pressed();
break;
...
...
@@ -4080,7 +4004,7 @@ void Vench::keyPressEvent( QKeyEvent *e )
break;
// case 16777234://left
case 65://left
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
on_BLeft_B_pressed();
break;
}
...
...
@@ -4126,7 +4050,7 @@ void Vench::keyPressEvent( QKeyEvent *e )
BRight->setDown(1);
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
on_BRight_B_pressed();
break;
}
...
...
@@ -4188,18 +4112,15 @@ void Vench::keyPressEvent( QKeyEvent *e )
}
void Vench::SetKatalog(
char*
kat)
void Vench::SetKatalog(
QString
kat)
{
strcpy(
katalog
,
kat
)
;
katalog
=
kat;
fl_kat=1;
}
void Vench::SetPort(
char*
kat)
void Vench::SetPort(
QString
kat)
{
addr = kat;
// qDebug("PPPP\n");
// qDebug()<<addr;
fl_port_s=1;
}
...
...
@@ -4427,7 +4348,7 @@ void Vench::init()
imp_diskr= 12;
addr_win = "COM3";
fl_begin=2;
if (fl
B
lue
T
ooth) fl_begin =4;
if (fl
_b
lue
t
ooth) fl_begin =4;
ReadIni();
...
...
@@ -4514,7 +4435,7 @@ void Vench::init()
thrRS->start();
if (!fl
B
lue
T
ooth){
if (!fl
_b
lue
t
ooth){
SendVklAPI();
SendVklNP();
SendZaprosI();
...
...
@@ -4574,7 +4495,7 @@ void Vench::init()
// d_yd[70] = -10;
if (fl
B
lue
T
ooth
==0
) {
if (
!
fl
_b
lue
t
ooth) {
ui->BDopParam->setChecked(1);
BPressedDopParam();
}
...
...
@@ -4688,7 +4609,7 @@ void Vench::keyReleaseEvent( QKeyEvent *e )
// printf("Kp1=%d\n",kp);
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
SendCommStop_ave_BT();
break;
}
...
...
@@ -4713,7 +4634,7 @@ void Vench::keyReleaseEvent( QKeyEvent *e )
break;
// case 16777237://down
case 83://down
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
SendCommStop_ave_BT();
break;
}
...
...
@@ -4735,7 +4656,7 @@ void Vench::keyReleaseEvent( QKeyEvent *e )
// case 16777234://left
case 65://left
// printf("terfdsvdcvc\n");
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
SendCommStop_ave_BT();
break;
}
...
...
@@ -4757,7 +4678,7 @@ void Vench::keyReleaseEvent( QKeyEvent *e )
break;
// case 16777236:// right
case 68:// right
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
SendCommStop_ave_BT();
break;
}
...
...
@@ -4783,7 +4704,7 @@ void Vench::keyReleaseEvent( QKeyEvent *e )
break;
case 32://probel
if (fl
B
lue
T
ooth){
if (fl
_b
lue
t
ooth){
SendCommStop_ave_BT();
break;
}
...
...
@@ -6508,7 +6429,7 @@ void Vench::BPressBar()
int Vench::SetAnswerUstr(int imp1, int imp2,int nD){
if ((fl_rec)&&(!fl
B
lue
T
ooth)){
if ((fl_rec)&&(!fl
_b
lue
t
ooth)){
if(num_comm<NUM_COMM){
if (checkDiskr->isChecked() == true){
mass_comm_n[num_comm][0] = imp1;
...
...
@@ -6627,7 +6548,7 @@ void Vench::TestFile(void * param)
if (md->fl_play){
if (ntec<md->num_comm){
if (!md->fl
B
lue
T
ooth){
if (!md->fl
_b
lue
t
ooth){
if ((md->fl_play_comm==0)||(md->checkAll->isChecked()== true)){//poprobovat moget kogda shirokoveshat budet luchshe ezdit
md->fl_play_comm=1;
if (md->checkAll->isChecked()== true) {
...
...
@@ -9909,7 +9830,7 @@ void Vench::ReadIni()
if (t=="SUPER_N") fl_begin=0;
if (t=="BASE") fl_begin=2;
if (fl
B
lue
T
ooth) fl_begin =4;
if (fl
_b
lue
t
ooth) fl_begin =4;
t= tt.readLine();
i=0;
...
...
@@ -15384,7 +15305,7 @@ void Vench::BRec_pressed_n()
//if (ui->BRec_n->isChecked()==1) return;
if (fl_rec==0) {
if (!fl
B
lue
T
ooth) {
if (!fl
_b
lue
t
ooth) {
BRec->setChecked( true);
BPressRec();
}
...
...
@@ -15398,7 +15319,7 @@ void Vench::BRec_pressed_n()
}
if (fl_rec==1) {
if (!fl
B
lue
T
ooth) {
if (!fl
_b
lue
t
ooth) {
BRec->setChecked(false);
BRealeseRec();
}
...
...
@@ -15463,8 +15384,8 @@ void Vench::on_pBProgr_clicked()
#ifdef LINUX_D
// fnamec= fnamec+"/"+f_name_kum;
if (fl
B
lue
T
ooth
==0
) fnamec= fnamec+f_name_kum;
if (fl
B
lue
T
ooth
==1
) fnamec= fnamec+f_name_snap;
if (
!
fl
_b
lue
t
ooth) fnamec= fnamec+f_name_kum;
if (fl
_b
lue
t
ooth) fnamec= fnamec+f_name_snap;
#endif
...
...
@@ -15774,7 +15695,7 @@ void Vench::rBAll()
}
void Vench::SendCommBipBT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -15792,7 +15713,7 @@ void Vench::SendCommBipBT()
void Vench::SendCommLightBT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -15810,7 +15731,7 @@ void Vench::SendCommLightBT()
void Vench::SendCommForw_ave_BT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -15837,7 +15758,7 @@ void Vench::SendCommForw_ave_BT()
void Vench::SendCommRevers_ave_BT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -15863,7 +15784,7 @@ void Vench::SendCommRevers_ave_BT()
void Vench::SendCommLeft_ave_BT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -15889,7 +15810,7 @@ void Vench::SendCommLeft_ave_BT()
void Vench::SendCommRight_ave_BT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -15916,7 +15837,7 @@ void Vench::SendCommRight_ave_BT()
void Vench::SendCommStop_ave_BT()
{
if (!fl
B
lue
T
ooth) return;
if (!fl
_b
lue
t
ooth) return;
...
...
@@ -16526,8 +16447,6 @@ void Vench::ReadSnap(QString &txt)
QDomNode node1,node2,node3,node4,node5,node6;
QString fnamec;
QString nfs(name_file_console);
fnamec= ServerDir->text();
...
...
@@ -16542,8 +16461,8 @@ void Vench::ReadSnap(QString &txt)
if (flConsole) fnamec= ServerDir->text();
if (flConsole==1) fnamec= fnamec + n
fs
;
if (flConsole==2) fnamec= n
fs
;
if (flConsole==1) fnamec= fnamec + n
ame_file_console
;
if (flConsole==2) fnamec= n
ame_file_console
;
qDebug()<<"lll";
qDebug()<<fnamec;
...
...
vench.h
Просмотр файла @
6190db19
...
...
@@ -192,7 +192,7 @@ public:
// explicit Vench(QWidget* parent = 0,char * kat="",char * prt="",int fBT=0, int fKon=0,char * nf ="");
explicit
Vench
(
QWidget
*
parent
,
char
*
kat
,
char
*
prt
,
int
fBT
,
int
fKon
,
char
*
nf
);
explicit
Vench
(
QWidget
*
parent
,
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
int
fKon
,
QString
nf
);
~
Vench
();
...
...
@@ -224,7 +224,7 @@ public:
struct
Spisoc_ust
act_ust
[
100
];
int
fl
B
lue
T
ooth
;
bool
fl
_b
lue
t
ooth
;
int
fl_period_e
;
double
t_oprosa_e
;
...
...
@@ -299,7 +299,7 @@ public:
unsigned
char
buf_zd
[
80
];
char
katalog
[
1000
]
;
QString
katalog
;
int
fl_kat
;
int
fl_port_s
;
int
flag_com
;
...
...
@@ -573,8 +573,8 @@ public slots:
//vozvrashaet nomer ustr v massive po ego mac-adresu
int
GetNumberUst
(
unsigned
char
*
mac
);
virtual
void
SetKatalog
(
char
*
);
virtual
void
SetPort
(
char
*
);
virtual
void
SetKatalog
(
QString
);
virtual
void
SetPort
(
QString
);
virtual
void
SbrosDatKas
();
...
...
@@ -899,7 +899,7 @@ protected:
QTimer
*
timer
;
double
timer_init_port
;
char
*
name_file_console
;
QString
name_file_console
;
int
flConsole
;
int
fl_print_log_B
;
protected
slots
:
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать