瀏覽代碼

Rename MainWindow.* into ctkEventBusDemoMainWindow.*

Closes #195
Jean-Christophe Fillion-Robin 13 年之前
父節點
當前提交
1ca09d8b4b

+ 4 - 4
Applications/ctkEventBusDemo/CMakeLists.txt

@@ -6,18 +6,18 @@ project(ctkEventBusDemo)
 
 set(KIT_SRCS
   ctkEventBusDemoMain.cpp
-  MainWindow.cpp
-  MainWindow.h
+  ctkEventBusDemoMainWindow.cpp
+  ctkEventBusDemoMainWindow.h
 )
 
 # Headers that should run through moc
 set(KIT_MOC_SRCS
-  MainWindow.h
+  ctkEventBusDemoMainWindow.h
 )
 
 # UI files
 set(KIT_UI_FORMS
-  MainWindow.ui
+  ctkEventBusDemoMainWindow.ui
 )
 
 # Resources

+ 2 - 2
Applications/ctkEventBusDemo/ctkEventBusDemoMain.cpp

@@ -34,7 +34,7 @@
 #include <QWidget>
 #include <QFileInfo>
 
-#include "MainWindow.h"
+#include "ctkEventBusDemoMainWindow.h"
 
 int main(int argv, char** argc) {
   QApplication app(argv, argc);
@@ -104,7 +104,7 @@ int main(int argv, char** argc) {
   ctkServiceReference ebr = framework->getPluginContext()->getServiceReference("ctkEventAdminBus");
   ctkEventAdminBus *eb = framework->getPluginContext()->getService<ctkEventAdminBus>(ebr);
 
-  MainWindow win(eb);
+  ctkEventBusDemoMainWindow win(eb);
   win.show();
 
   return app.exec();

+ 12 - 12
Applications/ctkEventBusDemo/MainWindow.cpp

@@ -1,30 +1,30 @@
-#include "MainWindow.h"
-#include "ui_MainWindow.h"
+#include "ctkEventBusDemoMainWindow.h"
+#include "ui_ctkEventBusDemoMainWindow.h"
 
 #include "ctkEventAdminBus.h"
 
-MainWindow::MainWindow(QWidget *parent)
-  :  QMainWindow(parent), ui(new Ui::MainWindow)
+ctkEventBusDemoMainWindow::ctkEventBusDemoMainWindow(QWidget *parent)
+  :  QMainWindow(parent), ui(new Ui::ctkEventBusDemoMainWindow)
 {
     ui->setupUi(this);
 }
 
-MainWindow::MainWindow(ctkEventAdminBus *bus, QWidget *parent)
+ctkEventBusDemoMainWindow::ctkEventBusDemoMainWindow(ctkEventAdminBus *bus, QWidget *parent)
   : QMainWindow(parent),
-    ui(new Ui::MainWindow),  m_EventBus(bus)
+    ui(new Ui::ctkEventBusDemoMainWindow),  m_EventBus(bus)
 {
     ui->setupUi(this);
     connectEvents();
 }
 
 
-MainWindow::~MainWindow()
+ctkEventBusDemoMainWindow::~ctkEventBusDemoMainWindow()
 {
     delete handler;
     delete ui;
 }
 
-void MainWindow::connectEvents() {
+void ctkEventBusDemoMainWindow::connectEvents() {
     handler = new ctkEventDemo();
     connect(ui->btnSend, SIGNAL(released()), this, SLOT(sendEvent()));
     connect(handler, SIGNAL(updateMessageSignal(QString)), this, SLOT(updateMessage(QString)));
@@ -37,7 +37,7 @@ void MainWindow::connectEvents() {
     m_EventBus->subscribeSlot(handler, "receiveEvent(QVariantList)", dic);
 }
 
-void MainWindow::sendEvent() {
+void ctkEventBusDemoMainWindow::sendEvent() {
 
     QString textToDisplay("Me: ");
     textToDisplay.append(ui->txtParameter->property("plainText").toString());
@@ -63,7 +63,7 @@ void MainWindow::sendEvent() {
     m_EventBus->sendEvent(event);
 }
 
-void MainWindow::changeEvent(QEvent *e)
+void ctkEventBusDemoMainWindow::changeEvent(QEvent *e)
 {
     QMainWindow::changeEvent(e);
     switch (e->type()) {
@@ -75,11 +75,11 @@ void MainWindow::changeEvent(QEvent *e)
     }
 }
 
-void MainWindow::updateMessage(QString message) {
+void ctkEventBusDemoMainWindow::updateMessage(QString message) {
     ui->textBrowser->append(message);
 }
 
-void MainWindow::connectClient() {
+void ctkEventBusDemoMainWindow::connectClient() {
     bool result, resultClient, resultServer;
     resultClient = m_EventBus->createServer("XMLRPC", ui->portLineEdit->text().toInt());
     m_EventBus->startListen();

+ 9 - 9
Applications/ctkEventBusDemo/MainWindow.h

@@ -1,5 +1,5 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
+#ifndef CTKEVENTBUSDEMOMAINWINDOW_H
+#define CTKEVENTBUSDEMOMAINWINDOW_H
 
 #include <QMainWindow>
 #include <QVariant>
@@ -7,7 +7,7 @@
 class ctkEventAdminBus;
 
 namespace Ui {
-    class MainWindow;
+    class ctkEventBusDemoMainWindow;
 }
 
 class ctkEventDemo : public QObject {
@@ -21,12 +21,12 @@ public Q_SLOTS:
     void receiveEvent(QVariantList l);
 };
 
-class MainWindow : public QMainWindow {
+class ctkEventBusDemoMainWindow : public QMainWindow {
     Q_OBJECT
 public:
-    MainWindow(QWidget *parent = 0);
-    MainWindow(ctkEventAdminBus *bus, QWidget *parent = 0);
-    ~MainWindow();
+    ctkEventBusDemoMainWindow(QWidget *parent = 0);
+    ctkEventBusDemoMainWindow(ctkEventAdminBus *bus, QWidget *parent = 0);
+    ~ctkEventBusDemoMainWindow();
 
 public Q_SLOTS:
     void sendEvent();
@@ -38,10 +38,10 @@ protected:
     void connectEvents();
 
 private:
-    Ui::MainWindow *ui;
+    Ui::ctkEventBusDemoMainWindow *ui;
     ctkEventAdminBus *m_EventBus;
 
     ctkEventDemo *handler;
 };
 
-#endif // MAINWINDOW_H
+#endif // CTKEVENTBUSDEMOMAINWINDOW_H

+ 1 - 1
Applications/ctkEventBusDemo/MainWindow.ui

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>MainWindow</class>
+ <class>ctkEventBusDemoMainWindow</class>
  <widget class="QMainWindow" name="MainWindow">
   <property name="geometry">
    <rect>