Открыть боковую панель
МОС
Исходные коды
devel
smartcar
Коммиты
d8b096f5
Коммит
d8b096f5
создал
Июн 02, 2025
по автору
Коул Милена Ричардовна
Просмотр файлов
remove console mode
владелец
f9689f65
Изменения
5
Скрыть пробелы
Построчно
Рядом
forms/mainwindow.cpp
Просмотр файла @
d8b096f5
...
...
@@ -3,7 +3,7 @@
#include
"bluetoothmode.h"
MainWindow
::
MainWindow
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
int
fKon
,
QString
nf
,
QWidget
*
parent
)
:
MainWindow
::
MainWindow
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
QWidget
*
parent
)
:
QMainWindow
(
parent
),
ui
(
new
Ui
::
MainWindow
)
{
...
...
@@ -13,7 +13,7 @@ MainWindow::MainWindow(QString kat, QString prt, bool isBluetoothMode, int fKon,
setAcceptDrops
(
false
);
setFocusPolicy
(
Qt
::
ClickFocus
);
m_vench
=
new
Vench
(
kat
,
prt
,
isBluetoothMode
,
fKon
,
nf
);
m_vench
=
new
Vench
(
kat
,
prt
,
isBluetoothMode
);
ui
->
centralwidget
->
layout
()
->
addWidget
(
new
BluetoothMode
(
m_vench
,
this
));
}
...
...
forms/mainwindow.h
Просмотр файла @
d8b096f5
...
...
@@ -13,7 +13,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
explicit
MainWindow
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
int
fKon
,
QString
nf
,
QWidget
*
parent
=
nullptr
);
explicit
MainWindow
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
QWidget
*
parent
=
nullptr
);
~
MainWindow
();
private:
...
...
main.cpp
Просмотр файла @
d8b096f5
...
...
@@ -14,9 +14,6 @@
int
main
(
int
argc
,
char
**
argv
)
{
QApplication
a
(
argc
,
argv
);
int
flKonsol
=
0
;
QString
name_file
;
QString
katalog
;
QString
port_s
;
...
...
@@ -42,29 +39,10 @@ int main( int argc, char ** argv )
++
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
"
);
}
}
MainWindow
*
w
=
new
MainWindow
(
katalog
,
port_s
,
true
,
flKonsol
,
name_file
);
if
(
!
flKonsol
)
w
->
show
();
MainWindow
*
w
=
new
MainWindow
(
katalog
,
port_s
,
true
);
w
->
show
();
a
.
connect
(
&
a
,
SIGNAL
(
lastWindowClosed
()
),
&
a
,
SLOT
(
quit
()
)
);
return
a
.
exec
();
...
...
vench.cpp
Просмотр файла @
d8b096f5
...
...
@@ -147,7 +147,7 @@ void Vench::DatKas(Dat dat) //0 - right 1 - left
emit
DatChanged
(
dat
);
}
Vench
::
Vench
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
int
fKon
,
QString
nf
,
QObject
*
parent
)
Vench
::
Vench
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
QObject
*
parent
)
:
QObject
(
parent
)
{
fl_bluetooth
=
isBluetoothMode
;
...
...
@@ -181,9 +181,6 @@ Vench::Vench(QString kat, QString prt, bool isBluetoothMode, int fKon, QString n
if
(
!
prt
.
isEmpty
())
SetPort
(
prt
);
init
();
flConsole
=
fKon
;
name_file_console
=
nf
;
/*
connect( BSendEth , SIGNAL( clicked() ), this, SLOT(BPressSendEth() ) );
connect( BSendEthAT , SIGNAL( clicked() ), this, SLOT(BPressSendEthAT() ) );
...
...
@@ -349,16 +346,6 @@ void Vench::ClearSpBeg()
void
Vench
::
ProcessTimer
()
{
if
(
flConsole
)
{
qDebug
()
<<
serverDir
;
SetXMLFlag
(
true
);
ProgramClicked
();
disconnect
(
timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
ProcessTimer
()));
COMClose
();
qDebug
()
<<
"program done"
;
}
for
(
int
i
=
0
;
i
<
k_hid
;
++
i
)
{
if
(
mas_fl_hid
[
i
]
!=
2
)
...
...
@@ -8416,13 +8403,6 @@ void Vench::ReadSnap(QString &txt)
QString
fnamec
=
serverDir
+
f_name_snap
;
if
(
flConsole
)
fnamec
=
serverDir
;
if
(
flConsole
==
1
)
fnamec
+=
name_file_console
;
if
(
flConsole
==
2
)
fnamec
=
name_file_console
;
qDebug
()
<<
"lll"
;
qDebug
()
<<
fnamec
;
...
...
vench.h
Просмотр файла @
d8b096f5
...
...
@@ -153,7 +153,7 @@ class Vench: public QObject
Q_OBJECT
public:
explicit
Vench
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
int
fKon
,
QString
nf
,
QObject
*
parent
=
nullptr
);
explicit
Vench
(
QString
kat
,
QString
prt
,
bool
isBluetoothMode
,
QObject
*
parent
=
nullptr
);
~
Vench
();
...
...
@@ -643,8 +643,6 @@ protected:
QTimer
*
timer
;
double
timer_init_port
;
QString
name_file_console
;
int
flConsole
;
bool
fl_print_log_B
;
QString
serverDir
;
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать