Procházet zdrojové kódy

Rename ctkConsoleWidget/ctkPythonShell into ctkConsole/ctkPythonConsole

Jean-Christophe Fillion-Robin před 15 roky
rodič
revize
ff8759bec9

+ 1 - 1
Applications/ctkSimplePythonShell/Testing/Python/ctkWidgetsTest.py

@@ -5,7 +5,7 @@ from qt import QTimer
 w = ctkMatrixWidget()
 w.show()
 
-if not _ctkPythonShellInstance.isInteractive:
+if not _ctkPythonConsoleInstance.isInteractive:
   #QTimer().singleShot(0, app(), SLOT('quit()'))
   t = QTimer()
   t.setInterval(250)

+ 3 - 3
Applications/ctkSimplePythonShell/Testing/Python/derivedQWidgetTest.py

@@ -13,7 +13,7 @@ class ExampleWidget(QWidget):
     checkbox = QCheckBox('Shell Visibility', self)
     layout.addWidget(checkbox);
     checkbox.setChecked(True)
-    checkbox.connect('toggled(bool)', _ctkPythonShellInstance, 'setVisible(bool)')
+    checkbox.connect('toggled(bool)', _ctkPythonConsoleInstance, 'setVisible(bool)')
     
     self.button = QPushButton('Quit', self)
     layout.addWidget(self.button);
@@ -29,8 +29,8 @@ class ExampleWidget(QWidget):
 w = ExampleWidget()
 w.show()
 
-if not _ctkPythonShellInstance.isInteractive:
-  #QTimer().singleShot(0, app(), SLOT('quit()'))
+if not _ctkPythonConsoleInstance.isInteractive:
+  #QTimer().singleShot(250, app(), SLOT('quit()'))
   t = QTimer()
   t.setInterval(250)
   t.connect('timeout()', app(), 'quit()')

+ 7 - 7
Applications/ctkSimplePythonShell/ctkSimplePythonShellMain.cpp

@@ -4,7 +4,7 @@
 #include <QTextStream>
 
 // CTK includes
-#include <ctkPythonShell.h>
+#include <ctkPythonConsole.h>
 #include <ctkCommandLineParser.h>
 
 #include "ctkSimplePythonManager.h"
@@ -54,14 +54,14 @@ int main(int argc, char** argv)
   
   ctkSimplePythonManager pythonManager;
   
-  ctkPythonShell shell(&pythonManager);
-  shell.setAttribute(Qt::WA_QuitOnClose, true);
-  shell.resize(600, 280);
-  shell.show();
+  ctkPythonConsole console(&pythonManager);
+  console.setAttribute(Qt::WA_QuitOnClose, true);
+  console.resize(600, 280);
+  console.show();
 
-  shell.setProperty("isInteractive", parsedArgs.contains("interactive"));
+  console.setProperty("isInteractive", parsedArgs.contains("interactive"));
 
-  pythonManager.addObjectToPythonMain("_ctkPythonShellInstance", &shell);
+  pythonManager.addObjectToPythonMain("_ctkPythonConsoleInstance", &console);
 
   ctkTestWrappedQProperty testWrappedQProperty;
   pythonManager.addObjectToPythonMain("_testWrappedQPropertyInstance", &testWrappedQProperty);

+ 3 - 3
Libs/Scripting/Python/Widgets/CMakeLists.txt

@@ -16,13 +16,13 @@ SET(KIT_export_directive "CTK_SCRIPTING_PYTHON_WIDGETS_EXPORT")
   
 # Source files
 SET(KIT_SRCS
-  ctkPythonShell.cpp
-  ctkPythonShell.h
+  ctkPythonConsole.cpp
+  ctkPythonConsole.h
   )
 
 # Headers that should run through moc
 SET(KIT_MOC_SRCS
-  ctkPythonShell.h
+  ctkPythonConsole.h
   )
 
 # UI files

+ 2 - 2
Libs/Scripting/Python/Widgets/Testing/Cpp/CMakeLists.txt

@@ -1,7 +1,7 @@
 SET(KIT ${PROJECT_NAME})
 
 CREATE_TEST_SOURCELIST(Tests ${KIT}CppTests.cpp
-  ctkPythonShellTest1.cpp
+  ctkPythonConsoleTest1.cpp
   #EXTRA_INCLUDE TestingMacros.h
   )
 
@@ -24,4 +24,4 @@ ENDMACRO( SIMPLE_TEST  )
 # Add Tests
 #
 
-SIMPLE_TEST( ctkPythonShellTest1 )
+SIMPLE_TEST( ctkPythonConsoleTest1 )

+ 6 - 6
Libs/Scripting/Python/Widgets/Testing/Cpp/ctkPythonShellTest1.cpp

@@ -24,23 +24,23 @@
 #include <QPushButton>
 
 // CTK includes
-#include "ctkPythonShell.h"
+#include "ctkPythonConsole.h"
 #include "ctkAbstractPythonManager.h"
 
 // STD includes
-#include <stdlib.h>
+#include <cstdlib>
 #include <iostream>
 
 //-----------------------------------------------------------------------------
-int ctkPythonShellTest1(int argc, char * argv [] )
+int ctkPythonConsoleTest1(int argc, char * argv [] )
 {
   QApplication app(argc, argv);
 
-  QPushButton button("Show PythonShell");
+  QPushButton button("Show PythonConsole");
 
-  ctkPythonShell pythonShell(new ctkAbstractPythonManager);
+  ctkPythonConsole pythonConsole(new ctkAbstractPythonManager);
 
-  QObject::connect(&button, SIGNAL(clicked()), &pythonShell, SLOT(show()));
+  QObject::connect(&button, SIGNAL(clicked()), &pythonConsole, SLOT(show()));
 
   button.show();
 

+ 37 - 37
Libs/Scripting/Python/Widgets/ctkPythonShell.cpp

@@ -64,9 +64,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <PythonQtObjectPtr.h>
 
 // CTK includes
-#include <ctkConsoleWidget.h>
+#include <ctkConsole.h>
 #include <ctkAbstractPythonManager.h>
-#include "ctkPythonShell.h"
+#include "ctkPythonConsole.h"
 
 #ifdef __GNUC__
 // Disable warnings related to Python macros and functions
@@ -76,13 +76,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif
 
 //----------------------------------------------------------------------------
-// ctkPythonShellCompleter
+// ctkPythonConsoleCompleter
 
 //----------------------------------------------------------------------------
-class ctkPythonShellCompleter : public ctkConsoleWidgetCompleter
+class ctkPythonConsoleCompleter : public ctkConsoleCompleter
 {
 public:
-  ctkPythonShellCompleter(ctkPythonShell& p) : Parent(p)
+  ctkPythonConsoleCompleter(ctkPythonConsole& p) : Parent(p)
     {
     this->setParent(&p);
     }
@@ -140,28 +140,28 @@ public:
       this->popup()->setCurrentIndex(this->completionModel()->index(0, 0));
       }
     }
-  ctkPythonShell& Parent;
+  ctkPythonConsole& Parent;
 };
 
 
 //----------------------------------------------------------------------------
-// ctkPythonShellPrivate
+// ctkPythonConsolePrivate
 
 //----------------------------------------------------------------------------
-class ctkPythonShellPrivate
+class ctkPythonConsolePrivate
 {
-  Q_DECLARE_PUBLIC(ctkPythonShell);
+  Q_DECLARE_PUBLIC(ctkPythonConsole);
 protected:
-  ctkPythonShell* const q_ptr;
+  ctkPythonConsole* const q_ptr;
 public:
-  ctkPythonShellPrivate(ctkPythonShell& object, ctkAbstractPythonManager* pythonManager)
+  ctkPythonConsolePrivate(ctkPythonConsole& object, ctkAbstractPythonManager* pythonManager)
     : q_ptr(&object), Console(&object), PythonManager(pythonManager), MultilineStatement(false),
     InteractiveConsole(0)
   {
   }
 
 //----------------------------------------------------------------------------
-  ~ctkPythonShellPrivate()
+  ~ctkPythonConsolePrivate()
   {
   }
 
@@ -260,7 +260,7 @@ public:
 
   /// Provides a console for gathering user input and displaying 
   /// Python output
-  ctkConsoleWidget Console;
+  ctkConsole Console;
 
   ctkAbstractPythonManager* PythonManager;
 
@@ -271,25 +271,25 @@ public:
 };
 
 //----------------------------------------------------------------------------
-// ctkPythonShell methods
+// ctkPythonConsole methods
 
 //----------------------------------------------------------------------------
-ctkPythonShell::ctkPythonShell(ctkAbstractPythonManager* pythonManager, QWidget* parentObject):
+ctkPythonConsole::ctkPythonConsole(ctkAbstractPythonManager* pythonManager, QWidget* parentObject):
   Superclass(parentObject),
-  d_ptr(new ctkPythonShellPrivate(*this, pythonManager))
+  d_ptr(new ctkPythonConsolePrivate(*this, pythonManager))
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
 
   // Layout UI
   QVBoxLayout* const boxLayout = new QVBoxLayout(this);
   boxLayout->setMargin(0);
   boxLayout->addWidget(&d->Console);
 
-  this->setObjectName("pythonShell");
+  this->setObjectName("pythonConsole");
 
   this->setFocusProxy(&d->Console);
 
-  ctkPythonShellCompleter* completer = new ctkPythonShellCompleter(*this);
+  ctkPythonConsoleCompleter* completer = new ctkPythonConsoleCompleter(*this);
   d->Console.setCompleter(completer);
   
   QObject::connect(
@@ -317,22 +317,22 @@ ctkPythonShell::ctkPythonShell(ctkAbstractPythonManager* pythonManager, QWidget*
 }
 
 //----------------------------------------------------------------------------
-ctkPythonShell::~ctkPythonShell()
+ctkPythonConsole::~ctkPythonConsole()
 {
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::clear()
+void ctkPythonConsole::clear()
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
   d->Console.clear();
   d->promptForInput();
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::executeScript(const QString& script)
+void ctkPythonConsole::executeScript(const QString& script)
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
   Q_UNUSED(script);
   
   this->printStdout("\n");
@@ -344,7 +344,7 @@ void ctkPythonShell::executeScript(const QString& script)
 }
 
 //----------------------------------------------------------------------------
-QStringList ctkPythonShell::getPythonAttributes(const QString& pythonVariableName)
+QStringList ctkPythonConsole::getPythonAttributes(const QString& pythonVariableName)
 {
 //   this->makeCurrent();
 
@@ -406,9 +406,9 @@ QStringList ctkPythonShell::getPythonAttributes(const QString& pythonVariableNam
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::printStdout(const QString& text)
+void ctkPythonConsole::printStdout(const QString& text)
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
 
   QTextCharFormat format = d->Console.getFormat();
   format.setForeground(QColor(0, 150, 0));
@@ -420,9 +420,9 @@ void ctkPythonShell::printStdout(const QString& text)
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::printMessage(const QString& text)
+void ctkPythonConsole::printMessage(const QString& text)
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
 
   QTextCharFormat format = d->Console.getFormat();
   format.setForeground(QColor(0, 0, 150));
@@ -432,9 +432,9 @@ void ctkPythonShell::printMessage(const QString& text)
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::printStderr(const QString& text)
+void ctkPythonConsole::printStderr(const QString& text)
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
 
   QTextCharFormat format = d->Console.getFormat();
   format.setForeground(QColor(255, 0, 0));
@@ -446,9 +446,9 @@ void ctkPythonShell::printStderr(const QString& text)
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::onExecuteCommand(const QString& Command)
+void ctkPythonConsole::onExecuteCommand(const QString& Command)
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
 
   QString command = Command;
   command.replace(QRegExp("\\s*$"), "");
@@ -465,16 +465,16 @@ void ctkPythonShell::onExecuteCommand(const QString& Command)
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::promptForInput()
+void ctkPythonConsole::promptForInput()
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
   d->promptForInput();
 }
 
 //----------------------------------------------------------------------------
-void ctkPythonShell::internalExecuteCommand(const QString& command)
+void ctkPythonConsole::internalExecuteCommand(const QString& command)
 {
-  Q_D(ctkPythonShell);
+  Q_D(ctkPythonConsole);
   emit this->executing(true);  
   d->executeCommand(command);
   emit this->executing(false);

+ 10 - 10
Libs/Scripting/Python/Widgets/ctkPythonShell.h

@@ -49,8 +49,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 =========================================================================*/
 
-#ifndef __ctkPythonShell_h
-#define __ctkPythonShell_h
+#ifndef __ctkPythonConsole_h
+#define __ctkPythonConsole_h
 
 // Qt includes
 #include <QWidget>
@@ -60,23 +60,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 /**
   Qt widget that provides an interactive "shell" interface to an embedded Python interpreter.
-  You can put an instance of ctkPythonShell in a dialog or a window, and the user will be able
+  You can put an instance of ctkPythonConsole in a dialog or a window, and the user will be able
   to enter Python commands and see their output, while the UI is still responsive.
   
   \sa pqConsoleWidget, pqPythonDialog
 */  
 
-class ctkPythonShellPrivate;
+class ctkPythonConsolePrivate;
 class ctkAbstractPythonManager;
 
-class CTK_SCRIPTING_PYTHON_WIDGETS_EXPORT ctkPythonShell : public QWidget
+class CTK_SCRIPTING_PYTHON_WIDGETS_EXPORT ctkPythonConsole : public QWidget
 {
   Q_OBJECT
   
 public:
   typedef QWidget Superclass; 
-  ctkPythonShell(ctkAbstractPythonManager* pythonManager, QWidget* parentObject = 0);
-  ~ctkPythonShell();
+  ctkPythonConsole(ctkAbstractPythonManager* pythonManager, QWidget* parentObject = 0);
+  ~ctkPythonConsole();
 
   /// Prints some text on the shell.
   void printMessage(const QString&);
@@ -99,11 +99,11 @@ protected slots:
   void onExecuteCommand(const QString&);
 
 protected:
-  QScopedPointer<ctkPythonShellPrivate> d_ptr;
+  QScopedPointer<ctkPythonConsolePrivate> d_ptr;
 
 private:
-  Q_DECLARE_PRIVATE(ctkPythonShell);
-  Q_DISABLE_COPY(ctkPythonShell);
+  Q_DECLARE_PRIVATE(ctkPythonConsole);
+  Q_DISABLE_COPY(ctkPythonConsole);
 
   void promptForInput();
   void internalExecuteCommand(const QString&);

+ 3 - 3
Libs/Widgets/CMakeLists.txt

@@ -33,8 +33,8 @@ SET(KIT_SRCS
   ctkColorDialog.h
   ctkColorPickerButton.cpp
   ctkColorPickerButton.h
-  ctkConsoleWidget.cpp
-  ctkConsoleWidget.h
+  ctkConsole.cpp
+  ctkConsole.h
   ctkConfirmExitDialog.cpp
   ctkConfirmExitDialog.h
   ctkCoordinatesWidget.cpp
@@ -146,7 +146,7 @@ SET(KIT_MOC_SRCS
   ctkColorDialog.h
   ctkColorPickerButton.h
   ctkConfirmExitDialog.h
-  ctkConsoleWidget.h
+  ctkConsole.h
   ctkCoordinatesWidget.h
   ctkDirectoryButton.h
   ctkDoubleRangeSlider.h

+ 2 - 2
Libs/Widgets/Testing/Cpp/CMakeLists.txt

@@ -15,7 +15,7 @@ CREATE_TEST_SOURCELIST(Tests ${KIT}CppTests.cxx
   ctkColorPickerButtonTest1.cpp
   ctkComboBoxTest1.cpp
   ctkConfirmExitDialogTest1.cpp
-  ctkConsoleWidgetTest1.cpp
+  ctkConsoleTest1.cpp
   ctkCoordinatesWidgetTest1.cpp
   ctkDirectoryButtonTest1.cpp
   ctkDoubleRangeSliderTest1.cpp
@@ -96,7 +96,7 @@ SIMPLE_TEST( ctkColorDialogTest2 )
 SIMPLE_TEST( ctkColorPickerButtonTest1 )
 SIMPLE_TEST( ctkComboBoxTest1 )
 SIMPLE_TEST( ctkConfirmExitDialogTest1 )
-SIMPLE_TEST( ctkConsoleWidgetTest1 )
+SIMPLE_TEST( ctkConsoleTest1 )
 SIMPLE_TEST( ctkCoordinatesWidgetTest1 )
 SIMPLE_TEST( ctkDateRangeWidgetTest1 )
 SIMPLE_TEST( ctkDirectoryButtonTest1 )

+ 5 - 5
Libs/Widgets/Testing/Cpp/ctkConsoleWidgetTest1.cpp

@@ -23,20 +23,20 @@
 #include <QTimer>
 
 // CTK includes
-#include "ctkConsoleWidget.h"
+#include "ctkConsole.h"
 
 // STD includes
-#include <stdlib.h>
+#include <cstdlib>
 #include <iostream>
 
 //-----------------------------------------------------------------------------
-int ctkConsoleWidgetTest1(int argc, char * argv [] )
+int ctkConsoleTest1(int argc, char * argv [] )
 {
   QApplication app(argc, argv);
 
-  ctkConsoleWidget widget;
+  ctkConsole console;
 
-  widget.show();
+  console.show();
 
   QTimer autoExit;
   if (argc < 2 || QString(argv[1]) != "-I")

+ 33 - 33
Libs/Widgets/ctkConsoleWidget.cpp

@@ -62,19 +62,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <QScrollBar>
 
 // CTK includes
-#include "ctkConsoleWidget.h"
+#include "ctkConsole.h"
 
 //-----------------------------------------------------------------------------
-// ctkConsoleWidgetPrivate
+// ctkConsolePrivate
 
 //-----------------------------------------------------------------------------
-class ctkConsoleWidgetPrivate : public QTextEdit
+class ctkConsolePrivate : public QTextEdit
 {
-  Q_DECLARE_PUBLIC(ctkConsoleWidget);
+  Q_DECLARE_PUBLIC(ctkConsole);
 protected:
-  ctkConsoleWidget* const q_ptr;
+  ctkConsole* const q_ptr;
 public:
-  ctkConsoleWidgetPrivate(ctkConsoleWidget& object) :
+  ctkConsolePrivate(ctkConsole& object) :
     QTextEdit(&object),
     q_ptr(&object),
     InteractivePosition(documentEnd())
@@ -288,7 +288,7 @@ public:
   /// else do nothing.
   void selectCompletion()
   {
-    Q_Q(ctkConsoleWidget);
+    Q_Q(ctkConsole);
     if (this->Completer && this->Completer->completionCount() == 1)
       {
       q->insertCompletion(this->Completer->currentCompletion());
@@ -356,7 +356,7 @@ public:
   /// Implements command-execution
   void internalExecuteCommand()
     {
-    Q_Q(ctkConsoleWidget);
+    Q_Q(ctkConsole);
 
     // First update the history cache. It's essential to update the
     // this->CommandPosition before calling internalExecuteCommand() since that
@@ -375,9 +375,9 @@ public:
     q->internalExecuteCommand(command);
     }
 
-  void setCompleter(ctkConsoleWidgetCompleter* completer)
+  void setCompleter(ctkConsoleCompleter* completer)
     {
-    Q_Q(ctkConsoleWidget);
+    Q_Q(ctkConsole);
 
     if (this->Completer)
       {
@@ -396,7 +396,7 @@ public:
     }
 
   /// A custom completer
-  QPointer<ctkConsoleWidgetCompleter> Completer;
+  QPointer<ctkConsoleCompleter> Completer;
 
   /** Stores the beginning of the area of interactive input, outside which
   changes can't be made to the text edit contents */
@@ -408,49 +408,49 @@ public:
 };
 
 //-----------------------------------------------------------------------------
-// ctkConsoleWidget methods
+// ctkConsole methods
 
 //-----------------------------------------------------------------------------
-ctkConsoleWidget::ctkConsoleWidget(QWidget* parentObject) :
+ctkConsole::ctkConsole(QWidget* parentObject) :
   QWidget(parentObject),
-  d_ptr(new ctkConsoleWidgetPrivate(*this))
+  d_ptr(new ctkConsolePrivate(*this))
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   QVBoxLayout* const l = new QVBoxLayout(this);
   l->setMargin(0);
   l->addWidget(d);
 }
 
 //-----------------------------------------------------------------------------
-ctkConsoleWidget::~ctkConsoleWidget()
+ctkConsole::~ctkConsole()
 {
 }
 
 //-----------------------------------------------------------------------------
-QTextCharFormat ctkConsoleWidget::getFormat()
+QTextCharFormat ctkConsole::getFormat()
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   return d->currentCharFormat();
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::setFormat(const QTextCharFormat& Format)
+void ctkConsole::setFormat(const QTextCharFormat& Format)
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   d->setCurrentCharFormat(Format);
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::setCompleter(ctkConsoleWidgetCompleter* completer)
+void ctkConsole::setCompleter(ctkConsoleCompleter* completer)
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   d->setCompleter(completer);
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::insertCompletion(const QString& completion)
+void ctkConsole::insertCompletion(const QString& completion)
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   QTextCursor tc = d->textCursor();
   tc.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor);
   if (tc.selectedText()==".")
@@ -469,9 +469,9 @@ void ctkConsoleWidget::insertCompletion(const QString& completion)
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::printString(const QString& Text)
+void ctkConsole::printString(const QString& Text)
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   d->textCursor().movePosition(QTextCursor::End);
   d->textCursor().insertText(Text);
   d->InteractivePosition = d->documentEnd();
@@ -479,17 +479,17 @@ void ctkConsoleWidget::printString(const QString& Text)
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::printCommand(const QString& cmd)
+void ctkConsole::printCommand(const QString& cmd)
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
   d->textCursor().insertText(cmd);
   d->updateCommandBuffer();
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::prompt(const QString& text)
+void ctkConsole::prompt(const QString& text)
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
 
   QTextCursor text_cursor = d->textCursor();
 
@@ -510,9 +510,9 @@ void ctkConsoleWidget::prompt(const QString& text)
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::clear()
+void ctkConsole::clear()
 {
-  Q_D(ctkConsoleWidget);
+  Q_D(ctkConsole);
 
   d->clear();
 
@@ -522,7 +522,7 @@ void ctkConsoleWidget::clear()
 }
 
 //-----------------------------------------------------------------------------
-void ctkConsoleWidget::internalExecuteCommand(const QString& Command)
+void ctkConsole::internalExecuteCommand(const QString& Command)
 {
   emit this->executeCommand(Command);
 }

+ 13 - 13
Libs/Widgets/ctkConsoleWidget.h

@@ -49,8 +49,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 =========================================================================*/
 
-#ifndef __ctkConsoleWidget_h
-#define __ctkConsoleWidget_h
+#ifndef __ctkConsole_h
+#define __ctkConsole_h
 
 // Qt includes
 #include <QWidget>
@@ -60,8 +60,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // CTK includes
 #include "ctkWidgetsExport.h"
 
-class ctkConsoleWidgetPrivate;
-class ctkConsoleWidgetCompleter;
+class ctkConsolePrivate;
+class ctkConsoleCompleter;
 
 
 /// Qwidget that provides an interactive console - you can send text to the
@@ -69,13 +69,13 @@ class ctkConsoleWidgetCompleter;
 /// executeCommand() slot.
 ///  
 /// \sa pqPythonShell, pqOutputWindow
-class CTK_WIDGETS_EXPORT ctkConsoleWidget : public QWidget
+class CTK_WIDGETS_EXPORT ctkConsole : public QWidget
 {
   Q_OBJECT
   
 public:
-  ctkConsoleWidget(QWidget* parentObject = 0);
-  virtual ~ctkConsoleWidget();
+  ctkConsole(QWidget* parentObject = 0);
+  virtual ~ctkConsole();
 
   /// Returns the current formatting that will be used by printString
   QTextCharFormat getFormat();
@@ -84,7 +84,7 @@ public:
   void setFormat(const QTextCharFormat& Format);
 
   /// Set a completer for this console widget
-  void setCompleter(ctkConsoleWidgetCompleter* completer);
+  void setCompleter(ctkConsoleCompleter* completer);
   
 signals:
   /// Signal emitted whenever the user enters a command
@@ -115,17 +115,17 @@ public slots:
 protected:
 
 protected:
-  QScopedPointer<ctkConsoleWidgetPrivate> d_ptr;
+  QScopedPointer<ctkConsolePrivate> d_ptr;
 
 private:
-  Q_DECLARE_PRIVATE(ctkConsoleWidget);
-  Q_DISABLE_COPY(ctkConsoleWidget);
+  Q_DECLARE_PRIVATE(ctkConsole);
+  Q_DISABLE_COPY(ctkConsole);
 
   void internalExecuteCommand(const QString& Command);
 };
 
 //-----------------------------------------------------------------------------
-class CTK_WIDGETS_EXPORT ctkConsoleWidgetCompleter : public QCompleter
+class CTK_WIDGETS_EXPORT ctkConsoleCompleter : public QCompleter
 {
 public:
 
@@ -136,4 +136,4 @@ public:
 };
 
 
-#endif // !__ctkConsoleWidget_h
+#endif