4848#include < serialtransmissiondialog.h> // for SerialTransmissionDialog
4949#include < utils/medium.h> // for Medium
5050
51- #include " commapp .h"
52- #include " filechecker.h" // for FileChecker
53- #include " ui_commapp .h"
51+ #include " gcodefileserver .h"
52+ #include " filechecker.h" // for FileChecker
53+ #include " ui_gcodefileserver .h" // for Ui::GCodeFileServer
5454
5555
56- CommApp::CommApp (QWidget* parent) : QMainWindow(parent), ui(new Ui::CommApp )
56+ GCodeFileServer::GCodeFileServer (QWidget* parent) : QMainWindow(parent), ui(new Ui::GCodeFileServer )
5757{
5858 setAttribute (Qt::WA_DeleteOnClose);
5959 ui->setupUi (this );
@@ -91,12 +91,12 @@ CommApp::CommApp(QWidget* parent) : QMainWindow(parent), ui(new Ui::CommApp)
9191 }
9292}
9393
94- CommApp ::~CommApp ()
94+ GCodeFileServer ::~GCodeFileServer ()
9595{
9696 delete ui;
9797}
9898
99- void CommApp ::closeEvent (QCloseEvent* event)
99+ void GCodeFileServer ::closeEvent (QCloseEvent* event)
100100{
101101 // QMessageBox::StandardButton result = QMessageBox::warning(this, tr("EdytorNC - Serial port file server"),
102102 // tr("You are trying to close a file server.\nAre you shure?"),
@@ -134,7 +134,7 @@ void CommApp::closeEvent(QCloseEvent* event)
134134 // event->accept();
135135}
136136
137- void CommApp ::saveSettings ()
137+ void GCodeFileServer ::saveSettings ()
138138{
139139 QStringList activeConfigs;
140140
@@ -156,7 +156,7 @@ void CommApp::saveSettings()
156156 settings.endGroup ();
157157}
158158
159- void CommApp ::loadSettings ()
159+ void GCodeFileServer ::loadSettings ()
160160{
161161 QSettings& settings = *Medium::instance ().settings ();
162162 settings.beginGroup (" CommApp" );
@@ -179,7 +179,7 @@ void CommApp::loadSettings()
179179 }
180180}
181181
182- SerialTransmissionDialog* CommApp ::createSerialPortServer (QString __config)
182+ SerialTransmissionDialog* GCodeFileServer ::createSerialPortServer (QString __config)
183183{
184184 SerialTransmissionDialog* spServer = new SerialTransmissionDialog (this , Qt::SubWindow,
185185 true ); // Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowTitleHint
@@ -191,7 +191,7 @@ SerialTransmissionDialog* CommApp::createSerialPortServer(QString __config)
191191 return spServer;
192192}
193193
194- void CommApp ::startSerialPortServer ()
194+ void GCodeFileServer ::startSerialPortServer ()
195195{
196196 QString _config = configBox->currentText ();
197197
@@ -206,7 +206,7 @@ void CommApp::startSerialPortServer()
206206 }
207207}
208208
209- void CommApp ::stopSerialPortServer ()
209+ void GCodeFileServer ::stopSerialPortServer ()
210210{
211211 QString _config = configBox->currentText ();
212212
@@ -220,7 +220,7 @@ void CommApp::stopSerialPortServer()
220220 changeActiveWindow ();
221221}
222222
223- void CommApp ::createActions ()
223+ void GCodeFileServer ::createActions ()
224224{
225225 configPortAct = new QAction (QIcon (" :/images/serialconfig.png" ), tr (" Serial port configuration" ),
226226 this );
@@ -320,7 +320,7 @@ void CommApp::createActions()
320320 // updateCurrentSerialConfig();
321321}
322322
323- void CommApp ::serialConfig ()
323+ void GCodeFileServer ::serialConfig ()
324324{
325325 SerialPortConfigDialog* serialConfigDialog = new SerialPortConfigDialog (this ,
326326 configBox->currentText ());
@@ -330,7 +330,7 @@ void CommApp::serialConfig()
330330 }
331331}
332332
333- void CommApp ::loadSerialConfignames ()
333+ void GCodeFileServer ::loadSerialConfignames ()
334334{
335335 int id;
336336 QStringList list;
@@ -378,7 +378,7 @@ void CommApp::loadSerialConfignames()
378378// }
379379// }
380380
381- void CommApp ::tileSubWindowsVertycally ()
381+ void GCodeFileServer ::tileSubWindowsVertycally ()
382382{
383383 // if(ui->mdiArea->subWindowList().isEmpty())
384384 // return;
@@ -394,7 +394,7 @@ void CommApp::tileSubWindowsVertycally()
394394 // }
395395}
396396
397- SerialTransmissionDialog* CommApp ::findMdiChild (const QString __config)
397+ SerialTransmissionDialog* GCodeFileServer ::findMdiChild (const QString __config)
398398{
399399 foreach (QMdiSubWindow* window, ui->mdiArea ->subWindowList ()) {
400400 SerialTransmissionDialog* mdiChild = qobject_cast<SerialTransmissionDialog*>(window->widget ());
@@ -408,7 +408,7 @@ SerialTransmissionDialog* CommApp::findMdiChild(const QString __config)
408408 return nullptr ;
409409}
410410
411- void CommApp ::setActiveSubWindow (QWidget* window)
411+ void GCodeFileServer ::setActiveSubWindow (QWidget* window)
412412{
413413 if (!window) {
414414 return ;
@@ -417,7 +417,7 @@ void CommApp::setActiveSubWindow(QWidget* window)
417417 ui->mdiArea ->setActiveSubWindow (qobject_cast<QMdiSubWindow*>(window));
418418}
419419
420- SerialTransmissionDialog* CommApp ::activeMdiChild ()
420+ SerialTransmissionDialog* GCodeFileServer ::activeMdiChild ()
421421{
422422 if (QMdiSubWindow* activeSubWindow = ui->mdiArea ->activeSubWindow ()) {
423423 return qobject_cast<SerialTransmissionDialog*>(activeSubWindow->widget ());
@@ -426,7 +426,7 @@ SerialTransmissionDialog* CommApp::activeMdiChild()
426426 return nullptr ;
427427}
428428
429- void CommApp ::activeWindowChanged (QMdiSubWindow* window)
429+ void GCodeFileServer ::activeWindowChanged (QMdiSubWindow* window)
430430{
431431 if (!window) {
432432 return ;
@@ -458,7 +458,7 @@ void CommApp::activeWindowChanged(QMdiSubWindow* window)
458458 }
459459}
460460
461- void CommApp ::changeActiveWindow ()
461+ void GCodeFileServer ::changeActiveWindow ()
462462{
463463 SerialTransmissionDialog* mdiChild = findMdiChild (configBox->currentText ());
464464
@@ -476,7 +476,7 @@ void CommApp::changeActiveWindow()
476476 }
477477}
478478
479- void CommApp ::closeTab (int i)
479+ void GCodeFileServer ::closeTab (int i)
480480{
481481 QTabBar* tab = ui->mdiArea ->findChild <QTabBar*>();
482482
@@ -485,7 +485,7 @@ void CommApp::closeTab(int i)
485485 }
486486}
487487
488- void CommApp ::doPortReset ()
488+ void GCodeFileServer ::doPortReset ()
489489{
490490 SerialTransmissionDialog* mdiChild = activeMdiChild ();
491491
@@ -494,7 +494,7 @@ void CommApp::doPortReset()
494494 }
495495}
496496
497- void CommApp ::showNewFiles ()
497+ void GCodeFileServer ::showNewFiles ()
498498{
499499 SerialTransmissionDialog* mdiChild = activeMdiChild ();
500500
@@ -511,7 +511,7 @@ void CommApp::showNewFiles()
511511 }
512512}
513513
514- void CommApp ::browseSaveFolder ()
514+ void GCodeFileServer ::browseSaveFolder ()
515515{
516516 SerialTransmissionDialog* mdiChild = activeMdiChild ();
517517
@@ -521,7 +521,7 @@ void CommApp::browseSaveFolder()
521521 }
522522}
523523
524- void CommApp ::createTrayIcon ()
524+ void GCodeFileServer ::createTrayIcon ()
525525{
526526 trayIconMenu = new QMenu (this );
527527 trayIconMenu->addAction (minimizeAction);
@@ -541,7 +541,7 @@ void CommApp::createTrayIcon()
541541 trayIcon->show ();
542542}
543543
544- void CommApp ::iconActivated (QSystemTrayIcon::ActivationReason reason)
544+ void GCodeFileServer ::iconActivated (QSystemTrayIcon::ActivationReason reason)
545545{
546546 switch (reason) {
547547 case QSystemTrayIcon::Trigger:
@@ -564,7 +564,7 @@ void CommApp::iconActivated(QSystemTrayIcon::ActivationReason reason)
564564 }
565565}
566566
567- void CommApp ::quitApp ()
567+ void GCodeFileServer ::quitApp ()
568568{
569569 saveSettings ();
570570
@@ -578,7 +578,7 @@ void CommApp::quitApp()
578578 close ();
579579}
580580
581- void CommApp ::about ()
581+ void GCodeFileServer ::about ()
582582{
583583 QMessageBox::about (this , tr (" About EdytorNC - Serial port file server" ),
584584 tr (" The <b>EdytorNC</b> is text editor for CNC programmers."
0 commit comments