Skip to content

Commit a8cc106

Browse files
committed
Move netsync functions to plugins, step first
1 parent 884269d commit a8cc106

11 files changed

+141
-136
lines changed

CMakeLists.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ set (HEADERS
1414
src/mainwindow.h
1515
src/settingsdialog.h
1616
model/basketbaseitem.h
17-
model/basketmodel.h
18-
netsync/firstnetworksender.h
19-
netsync/qsyncclientlist.h
20-
netsync/syncclient.h
21-
netsync/udplistener.h
22-
netsync/udpnetworksocket.h)
17+
model/basketmodel.h)
18+
# netsync/firstnetworksender.h
19+
# netsync/qsyncclientlist.h
20+
# netsync/syncclient.h
21+
# netsync/udplistener.h
22+
# netsync/udpnetworksocket.h)
2323
set (SOURCES
2424
aboutdialog.cpp
2525
src/basketutils.cpp
@@ -28,12 +28,12 @@ set (SOURCES
2828
src/mainwindow.cpp
2929
src/settingsdialog.cpp
3030
model/basketbaseitem.cpp
31-
model/basketmodel.cpp
32-
netsync/firstnetworksender.cpp
33-
netsync/qsyncclientlist.cpp
34-
netsync/syncclient.cpp
35-
netsync/udplistener.cpp
36-
netsync/udpnetworksocket.cpp)
31+
model/basketmodel.cpp)
32+
# netsync/firstnetworksender.cpp
33+
# netsync/qsyncclientlist.cpp
34+
# netsync/syncclient.cpp
35+
# netsync/udplistener.cpp
36+
# netsync/udpnetworksocket.cpp)
3737
set (FORMS
3838
aboutdialog.ui
3939
ui/mainwindow.ui

aboutdialog.ui

+18-55
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,9 @@
1313
<property name="windowTitle">
1414
<string>Информация о программе</string>
1515
</property>
16-
<property name="windowIcon">
17-
<iconset resource="icon-images.qrc">
18-
<normaloff>:/images/images/atis.png</normaloff>:/images/images/atis.png</iconset>
19-
</property>
2016
<layout class="QVBoxLayout" name="verticalLayout">
2117
<item>
2218
<layout class="QHBoxLayout" name="horizontalLayout">
23-
<item>
24-
<widget class="QLabel" name="label">
25-
<property name="sizePolicy">
26-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
27-
<horstretch>101</horstretch>
28-
<verstretch>101</verstretch>
29-
</sizepolicy>
30-
</property>
31-
<property name="minimumSize">
32-
<size>
33-
<width>101</width>
34-
<height>101</height>
35-
</size>
36-
</property>
37-
<property name="maximumSize">
38-
<size>
39-
<width>101</width>
40-
<height>101</height>
41-
</size>
42-
</property>
43-
<property name="text">
44-
<string/>
45-
</property>
46-
<property name="pixmap">
47-
<pixmap resource="icon-images.qrc">:/images/images/atis.png</pixmap>
48-
</property>
49-
<property name="scaledContents">
50-
<bool>true</bool>
51-
</property>
52-
</widget>
53-
</item>
5419
<item>
5520
<widget class="QLabel" name="labelCaption">
5621
<property name="text">
@@ -84,15 +49,13 @@ p, li { white-space: pre-wrap; }
8449
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
8550
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
8651
p, li { white-space: pre-wrap; }
87-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
88-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Программа поддерживает следующие &lt;/p&gt;
89-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;операционные системы:&lt;/p&gt;
90-
&lt;ul&gt;
91-
&lt;li&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000080;&quot;&gt;GNU/Linux&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;
92-
&lt;li&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000080;&quot;&gt;FreeBSD&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;
93-
&lt;li&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Microsoft Window 2000/XP/Vista/7&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;
94-
&lt;/ul&gt;
95-
&lt;/body&gt;&lt;/html&gt;</string>
52+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
53+
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:10pt;&quot;&gt;Программа поддерживает следующие &lt;/span&gt;&lt;/p&gt;
54+
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:10pt;&quot;&gt;операционные системы:&lt;/span&gt;&lt;/p&gt;
55+
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; font-family:'Sans Serif'; font-size:10pt;&quot; style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000080;&quot;&gt;GNU/Linux&lt;/span&gt;&lt;/li&gt;
56+
&lt;li style=&quot; font-family:'Sans Serif'; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000080;&quot;&gt;FreeBSD&lt;/span&gt;&lt;/li&gt;
57+
&lt;li style=&quot; font-family:'Sans Serif'; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Microsoft Window 2000/XP/Vista/7&lt;/span&gt;&lt;/li&gt;
58+
&lt;li style=&quot; font-family:'Sans Serif'; font-size:10pt; color:#000080;&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Mac OS X&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
9659
</property>
9760
<property name="alignment">
9861
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -112,10 +75,11 @@ p, li { white-space: pre-wrap; }
11275
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
11376
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
11477
p, li { white-space: pre-wrap; }
115-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
116-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Благодарности:&lt;/span&gt;&lt;/p&gt;
117-
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Андрею Митякину-Тен&lt;/span&gt; за помощь с картинками и активное тестирование.&lt;/li&gt;
118-
&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Инне Кабановой (mama-sun)&lt;/span&gt; за помощь в переводе на Английский язык.&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
78+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
79+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans'; font-size:10pt; font-weight:600;&quot;&gt;Благодарности:&lt;/span&gt;&lt;/p&gt;
80+
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; font-family:'Sans'; font-size:10pt;&quot; style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Андрею Митякину-Тен&lt;/span&gt; за помощь с картинками и активное тестирование.&lt;/li&gt;
81+
&lt;li style=&quot; font-family:'Sans'; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Инне Кабановой (mama-sun)&lt;/span&gt; за помощь в переводе на Английский язык.&lt;/li&gt;
82+
&lt;li style=&quot; font-family:'Sans'; font-size:10pt;&quot; style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;perchibald'у&lt;/span&gt; (активному &quot;туземцу&quot; [email protected]) за новую иконку программы&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
11983
</property>
12084
<property name="wordWrap">
12185
<bool>true</bool>
@@ -135,10 +99,11 @@ p, li { white-space: pre-wrap; }
13599
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
136100
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
137101
p, li { white-space: pre-wrap; }
138-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Tahoma'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
139-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;© 2009 ООО &quot;Атис Сервис&quot;&lt;/p&gt;
140-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.atisserv.ru&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;www.atisserv.ru&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
141-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Почтовый адрес разработчика: &lt;a href=&quot;mailto:[email protected]&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;[email protected]&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
102+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
103+
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Спасибо за использование программы&lt;/span&gt;&lt;/p&gt;
104+
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Tahoma'; font-size:10pt;&quot;&gt;Алексей Панов&lt;/span&gt;&lt;/p&gt;
105+
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://elemc.name&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://elemc.name&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
106+
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Tahoma'; font-size:10pt;&quot;&gt;Почтовый адрес разработчика: &lt;/span&gt;&lt;a href=&quot;mailto:[email protected]&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;[email protected]&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
142107
</property>
143108
<property name="alignment">
144109
<set>Qt::AlignCenter</set>
@@ -160,9 +125,7 @@ p, li { white-space: pre-wrap; }
160125
</item>
161126
</layout>
162127
</widget>
163-
<resources>
164-
<include location="icon-images.qrc"/>
165-
</resources>
128+
<resources/>
166129
<connections>
167130
<connection>
168131
<sender>buttonBox</sender>

basketpwd.pro

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
TEMPLATE = app
22
QT = gui \
33
core \
4-
xml \
5-
network
4+
xml
5+
# network # перенос в плагины
66
CONFIG += qt \
77
warn_on \
88
debug_and_release \
@@ -22,11 +22,12 @@ HEADERS = src/mainwindow.h \
2222
src/settingsdialog.h \
2323
model/basketbaseitem.h \
2424
model/basketmodel.h \
25-
netsync/firstnetworksender.h \
26-
netsync/qsyncclientlist.h \
27-
netsync/syncclient.h \
28-
netsync/udplistener.h \
29-
netsync/udpnetworksocket.h
25+
src/coreplugin.h
26+
# netsync/firstnetworksender.h \
27+
# netsync/qsyncclientlist.h \
28+
# netsync/syncclient.h \
29+
# netsync/udplistener.h \
30+
# netsync/udpnetworksocket.h
3031
SOURCES = src/mainwindow.cpp \
3132
src/main.cpp \
3233
src/basketutils.cpp \
@@ -35,11 +36,12 @@ SOURCES = src/mainwindow.cpp \
3536
src/settingsdialog.cpp \
3637
model/basketbaseitem.cpp \
3738
model/basketmodel.cpp \
38-
netsync/firstnetworksender.cpp \
39-
netsync/qsyncclientlist.cpp \
40-
netsync/syncclient.cpp \
41-
netsync/udplistener.cpp \
42-
netsync/udpnetworksocket.cpp
39+
src/coreplugin.cpp
40+
# netsync/firstnetworksender.cpp \
41+
# netsync/qsyncclientlist.cpp \
42+
# netsync/syncclient.cpp \
43+
# netsync/udplistener.cpp \
44+
# netsync/udpnetworksocket.cpp
4345
RESOURCES += icon-images.qrc
4446
RC_FILE = basketpwd.rc
4547
mac:RC_FILE = images/basketpwd.icns

icon-images.qrc

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<file>images/saveas.png</file>
2020
<file>images/showpasswords.png</file>
2121
<file>images/temp.png</file>
22-
<file>images/atis.png</file>
2322
<file>images/stock_task.png</file>
2423
</qresource>
2524
<qresource prefix="/lang">

images/atis.png

-50.8 KB
Binary file not shown.

netsync/firstnetworksender.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//#include <QThread>
55
//#include <QUdpSocket>
66
//#include <QDateTime>
7-
#include "udpnetworksocket.h"
7+
//#include "udpnetworksocket.h"
88

99
class FirstNetworkSender : public UdpNetworkSocket
1010
{

src/coreplugin.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "coreplugin.h"
2+
3+
CorePlugin::CorePlugin(QObject *parent) :
4+
QObject(parent)
5+
{
6+
}

src/coreplugin.h

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifndef COREPLUGIN_H
2+
#define COREPLUGIN_H
3+
4+
#include <QObject>
5+
6+
class CorePlugin : public QObject
7+
{
8+
Q_OBJECT
9+
public:
10+
explicit CorePlugin(QObject *parent = 0);
11+
12+
virtual ~CorePlugin() {} ;
13+
14+
virtual void plugin_load() {} ;
15+
virtual void plugin_start() {} ;
16+
virtual void plugin_unload() {} ;
17+
18+
signals:
19+
void pluginStateChanged();
20+
public slots:
21+
22+
};
23+
24+
Q_DECLARE_INTERFACE(CorePlugin, "name.elemc.basketpwd.CorePlugin/1.0")
25+
26+
#endif // COREPLUGIN_H

src/mainwindow.cpp

+44-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <QDebug>
2-
31
#include "mainwindow.h"
42
#include "changepassword.h"
53
#include "../aboutdialog.h"
@@ -14,10 +12,11 @@ MainWindow::MainWindow( QWidget * parent, Qt::WFlags f)
1412
createTrayIcon();
1513
initVariables();
1614

17-
udp_server = new UdpListener ( this );
18-
connect(udp_server, SIGNAL(ReceivedNewData(QString,QHostAddress)), this, SLOT(NewDataPresent(QString,QHostAddress)));
19-
connect(udp_server, SIGNAL(BindError(int,QString)), this, SLOT(UdpServerBindError(int,QString)));
20-
udp_server->start();
15+
// перенос в плагины
16+
// udp_server = new UdpListener ( this );
17+
// connect(udp_server, SIGNAL(ReceivedNewData(QString,QHostAddress)), this, SLOT(NewDataPresent(QString,QHostAddress)));
18+
// connect(udp_server, SIGNAL(BindError(int,QString)), this, SLOT(UdpServerBindError(int,QString)));
19+
// udp_server->start();
2120

2221
tree->setModel( model );
2322
tree->setDragEnabled(true);
@@ -30,7 +29,9 @@ MainWindow::MainWindow( QWidget * parent, Qt::WFlags f)
3029
connect ( model, SIGNAL(ThisIndexIsFold(QModelIndex)), this, SLOT(changeFoldStatus(QModelIndex)) );
3130
connect ( model, SIGNAL(primaryChanged()), this, SLOT(generateContextPrimaries()) );
3231
connect ( primaryActions, SIGNAL(triggered(QAction*)), this, SLOT(primaryActionsTriggered(QAction*)) );
33-
connect ( firstNetSender, SIGNAL(errorBySend(QString)), this, SLOT(NetworkError(QString)) );
32+
33+
// перенос в плагины
34+
//connect ( firstNetSender, SIGNAL(errorBySend(QString)), this, SLOT(NetworkError(QString)) );
3435

3536
newDatabase();
3637

@@ -62,10 +63,11 @@ MainWindow::MainWindow( QWidget * parent, Qt::WFlags f)
6263
changeSortMode();
6364
}
6465
MainWindow::~MainWindow() {
65-
if ( udp_server->isRunning() )
66-
udp_server->stop();
67-
while ( !udp_server->isFinished() ) {};
68-
delete udp_server;
66+
// перенос в плагины
67+
// if ( udp_server->isRunning() )
68+
// udp_server->stop();
69+
// while ( !udp_server->isFinished() ) {};
70+
// delete udp_server;
6971

7072
if ( quitAction )
7173
delete quitAction;
@@ -87,6 +89,9 @@ MainWindow::~MainWindow() {
8789

8890
if ( primaryActions )
8991
delete primaryActions;
92+
93+
if ( menuHelp )
94+
delete menuHelp;
9095
}
9196

9297
// Виртуалы
@@ -222,7 +227,8 @@ void MainWindow::newDatabase( bool isInteracrive )
222227

223228
if ( isInteracrive ) {
224229
changeCurrentPassword();
225-
notifyAboutSelf();
230+
//notifyAboutSelf();
231+
// перенос в плагины
226232
}
227233
else
228234
allowActions ( false );
@@ -318,7 +324,8 @@ void MainWindow::loadDatabase()
318324
tree->setColumnWidth(1, 200);
319325

320326
generateContextPrimaries();
321-
notifyAboutSelf();
327+
// перенос в плагины
328+
//notifyAboutSelf();
322329
}
323330
else
324331
QMessageBox::critical(this, tr("Ошибка чтения файла"), tr("Файл не является файлом XML или пароль не верен!"));
@@ -733,7 +740,12 @@ void MainWindow::initVariables()
733740
primaryActions = new QActionGroup(this);
734741
model = new BasketModel(this);
735742
tree = new QTreeView( this );
736-
firstNetSender = new FirstNetworkSender( this );
743+
// перенос в плагины
744+
//firstNetSender = new FirstNetworkSender( this );
745+
746+
menuHelp = menubar->addMenu(trUtf8("&Помощь"));
747+
menuHelp->addAction(actionHelpAbout);
748+
menuHelp->addAction(actionHelpAboutQt);
737749
}
738750

739751
void MainWindow::NetworkError(QString errmsg)
@@ -743,20 +755,21 @@ void MainWindow::NetworkError(QString errmsg)
743755
tr("Текст ошибки:\n %1").arg(errmsg) );
744756
}
745757

746-
void MainWindow::NewDataPresent(QString data, QHostAddress addr)
747-
{
748-
qDebug() << QString("Data: [%1] from IP %2").arg(data).arg(addr.toString());
749-
}
750-
void MainWindow::notifyAboutSelf()
751-
{
752-
syncClients.clear();
753-
firstNetSender->setId(model->identifier());
754-
firstNetSender->setDate(model->lastModified());
755-
firstNetSender->start();
756-
}
757-
void MainWindow::UdpServerBindError(int err, QString err_msg)
758-
{
759-
QMessageBox::critical(this,
760-
tr("Сетевая ошибка"),
761-
tr("Сервер UDP не смог запуститься\nКод ошибки:%1\nОшибка:%2").arg(err).arg(err_msg));
762-
}
758+
// перенос в плагины
759+
//void MainWindow::NewDataPresent(QString data, QHostAddress addr)
760+
//{
761+
// qDebug() << QString("Data: [%1] from IP %2").arg(data).arg(addr.toString());
762+
//}
763+
//void MainWindow::notifyAboutSelf()
764+
//{
765+
// syncClients.clear();
766+
// firstNetSender->setId(model->identifier());
767+
// firstNetSender->setDate(model->lastModified());
768+
// firstNetSender->start();
769+
//}
770+
//void MainWindow::UdpServerBindError(int err, QString err_msg)
771+
//{
772+
// QMessageBox::critical(this,
773+
// tr("Сетевая ошибка"),
774+
// tr("Сервер UDP не смог запуститься\nКод ошибки:%1\nОшибка:%2").arg(err).arg(err_msg));
775+
//}

0 commit comments

Comments
 (0)