Преглед на файлове

STYLE: In Libs/{Core,Widgets}, change filename prefix from qCTK to ctk

Jean-Christophe Fillion-Robin преди 15 години
родител
ревизия
c7f7002155

+ 2 - 2
Libs/Core/CMakeLists.txt

@@ -12,8 +12,8 @@ SET(KIT_include_directories
   
   
 # Source files
 # Source files
 SET(KIT_SRCS
 SET(KIT_SRCS
-  qCTKUtils.cxx
-  qCTKUtils.h
+  ctkUtils.cxx
+  ctkUtils.h
   )
   )
 
 
 # Headers that should run through moc
 # Headers that should run through moc

+ 2 - 2
Libs/Core/Testing/CMakeLists.txt

@@ -1,7 +1,7 @@
 SET(KIT CTKCore)
 SET(KIT CTKCore)
 
 
 CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
 CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
-  qCTKUtilsTest1.cxx
+  ctkUtilsTest1.cxx
   #EXTRA_INCLUDE TestingMacros.h
   #EXTRA_INCLUDE TestingMacros.h
   )
   )
 
 
@@ -26,4 +26,4 @@ ENDMACRO( SIMPLE_TEST  )
 # Add Tests
 # Add Tests
 #
 #
 
 
-SIMPLE_TEST( qCTKUtilsTest1 )
+SIMPLE_TEST( ctkUtilsTest1 )

+ 5 - 5
Libs/Core/Testing/qCTKUtilsTest1.cxx

@@ -13,7 +13,7 @@
 =========================================================================*/
 =========================================================================*/
 
 
 // qCTK includes
 // qCTK includes
-#include "qCTKUtils.h"
+#include "ctkUtils.h"
 
 
 // QT includes
 // QT includes
 #include <QStringList>
 #include <QStringList>
@@ -24,7 +24,7 @@
 #include <string>
 #include <string>
 #include <vector>
 #include <vector>
 
 
-int qCTKUtilsTest1(int argc, char * argv [] )
+int ctkUtilsTest1(int argc, char * argv [] )
 {
 {
   Q_UNUSED(argc);
   Q_UNUSED(argc);
   Q_UNUSED(argv);  
   Q_UNUSED(argv);  
@@ -38,7 +38,7 @@ int qCTKUtilsTest1(int argc, char * argv [] )
 
 
   std::vector<char*> outputCharVector;
   std::vector<char*> outputCharVector;
   
   
-  qCTKUtils::qListToSTLVector(inputStringList, outputCharVector);
+  ctkUtils::qListToSTLVector(inputStringList, outputCharVector);
 
 
   if (outputCharVector.size() != 3)
   if (outputCharVector.size() != 3)
     {
     {
@@ -72,7 +72,7 @@ int qCTKUtilsTest1(int argc, char * argv [] )
 
 
   std::vector<std::string> outputStringVector;
   std::vector<std::string> outputStringVector;
 
 
-  qCTKUtils::qListToSTLVector(inputStringList, outputStringVector);
+  ctkUtils::qListToSTLVector(inputStringList, outputStringVector);
 
 
   if (outputStringVector.size() != 3)
   if (outputStringVector.size() != 3)
     {
     {
@@ -106,7 +106,7 @@ int qCTKUtilsTest1(int argc, char * argv [] )
 
 
   QStringList ouputStringList;
   QStringList ouputStringList;
 
 
-  qCTKUtils::stlVectorToQList(inputStringVector, ouputStringList);
+  ctkUtils::stlVectorToQList(inputStringVector, ouputStringList);
 
 
   if (ouputStringList.size() != 3)
   if (ouputStringList.size() != 3)
     {
     {

+ 17 - 17
Libs/Core/qCTKPimpl.h

@@ -1,5 +1,5 @@
 /**
 /**
-\class qCTKPimpl qCTKPimpl
+\class ctkPimpl ctkPimpl
 \brief Hide private details of a class
 \brief Hide private details of a class
 
 
 Application code generally doesn't have to be concerned about hiding its
 Application code generally doesn't have to be concerned about hiding its
@@ -7,7 +7,7 @@ implementation details, but when writing library code it is important to
 maintain a constant interface, both source and binary. Maintaining a constant
 maintain a constant interface, both source and binary. Maintaining a constant
 source interface is easy enough, but keeping the binary interface constant
 source interface is easy enough, but keeping the binary interface constant
 means moving implementation details into a private class. The PIMPL, or
 means moving implementation details into a private class. The PIMPL, or
-d-pointer, idiom is a common method of implementing this separation. qCTKPimpl
+d-pointer, idiom is a common method of implementing this separation. ctkPimpl
 offers a convenient way to connect the public and private sides of your class.
 offers a convenient way to connect the public and private sides of your class.
 
 
 \section start Getting Started
 \section start Getting Started
@@ -45,12 +45,12 @@ private class can invoke functions in the public class by using the qctk_p()
 function (this one's actually a function).
 function (this one's actually a function).
 */
 */
 
 
-#ifndef __qCTKPimpl_h
-#define __qCTKPimpl_h
+#ifndef __ctkPimpl_h
+#define __ctkPimpl_h
 
 
 #include <QtGlobal>
 #include <QtGlobal>
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Define a public class constructor with no argument
  * Define a public class constructor with no argument
  *
  *
  * Also make sure the Pimpl is initalized
  * Also make sure the Pimpl is initalized
@@ -61,7 +61,7 @@ function (this one's actually a function).
     QCTK_INIT_PRIVATE(PUB);              \
     QCTK_INIT_PRIVATE(PUB);              \
     }
     }
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Define a public class constructor with one argument
  * Define a public class constructor with one argument
  *
  *
  * Also make sure the Pimpl is initalized
  * Also make sure the Pimpl is initalized
@@ -73,7 +73,7 @@ function (this one's actually a function).
     QCTK_INIT_PRIVATE(PUB);                     \
     QCTK_INIT_PRIVATE(PUB);                     \
     }
     }
     
     
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Define the setter in the public class.
  * Define the setter in the public class.
  *
  *
  * This should be put in the .cxx file of the public class. The parameter are
  * This should be put in the .cxx file of the public class. The parameter are
@@ -86,7 +86,7 @@ function (this one's actually a function).
     qctk_d.ref()._VARNAME =  var;                   \
     qctk_d.ref()._VARNAME =  var;                   \
   }
   }
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Define the setter in the public class.
  * Define the setter in the public class.
  *
  *
  * This should be put in the .cxx file of the public class. The parameter are
  * This should be put in the .cxx file of the public class. The parameter are
@@ -99,7 +99,7 @@ function (this one's actually a function).
     return qctk_d.ref()._VARNAME;                  \
     return qctk_d.ref()._VARNAME;                  \
   }
   }
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Declares that a public class has a related private class.
  * Declares that a public class has a related private class.
  *
  *
  * This should be put in the private section of the public class. The parameter is the name of the public class.
  * This should be put in the private section of the public class. The parameter is the name of the public class.
@@ -109,27 +109,27 @@ function (this one's actually a function).
 friend class PUB##Private; qCTKPrivateInterface<PUB, PUB##Private> qctk_d; \
 friend class PUB##Private; qCTKPrivateInterface<PUB, PUB##Private> qctk_d; \
 typedef PUB Self;
 typedef PUB Self;
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Declares that a private class has a related public class.
  * Declares that a private class has a related public class.
  *
  *
  * This may be put anywhere in the declaration of the private class. The parameter is the name of the public class.
  * This may be put anywhere in the declaration of the private class. The parameter is the name of the public class.
  */
  */
 #define QCTK_DECLARE_PUBLIC(PUB) friend class PUB;
 #define QCTK_DECLARE_PUBLIC(PUB) friend class PUB;
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Initializes resources owned by the private class.
  * Initializes resources owned by the private class.
  *
  *
  * This should be called from the public class's constructor,
  * This should be called from the public class's constructor,
  * before qctk_d() is used for the first time. The parameter is the name of the public class.
  * before qctk_d() is used for the first time. The parameter is the name of the public class.
  */
  */
 #define QCTK_INIT_PRIVATE(PUB) qctk_d.setPublic(this)
 #define QCTK_INIT_PRIVATE(PUB) qctk_d.setPublic(this)
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Returns a pointer (or reference) in the current scope named "d" to the private class.
  * Returns a pointer (or reference) in the current scope named "d" to the private class.
  *
  *
  * This function is only available in a class using \a QCTK_DECLARE_PRIVATE.
  * This function is only available in a class using \a QCTK_DECLARE_PRIVATE.
  */
  */
 #define QCTK_D(PUB) PUB##Private* d = qctk_d()
 #define QCTK_D(PUB) PUB##Private* d = qctk_d()
 #define QCTK_D_REF(PUB) PUB##Private& d = qctk_d.ref()
 #define QCTK_D_REF(PUB) PUB##Private& d = qctk_d.ref()
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Creates a pointer ( or reference) in the current scope named "q" to the public class.
  * Creates a pointer ( or reference) in the current scope named "q" to the public class.
  *
  *
  * This macro only works in a class using \a QCTK_DECLARE_PUBLIC.
  * This macro only works in a class using \a QCTK_DECLARE_PUBLIC.
@@ -138,14 +138,14 @@ typedef PUB Self;
 #define QCTK_P_REF(PUB) PUB& p = qctk_p_ref()
 #define QCTK_P_REF(PUB) PUB& p = qctk_p_ref()
 
 
 #ifdef QCTK_DOXYGEN_RUN
 #ifdef QCTK_DOXYGEN_RUN
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Returns a pointer to the private class.
  * Returns a pointer to the private class.
  *
  *
  * This function is only available in a class using \a QCTK_DECLARE_PRIVATE.
  * This function is only available in a class using \a QCTK_DECLARE_PRIVATE.
  */
  */
 qCTKPrivate<PUB>* qctk_d();
 qCTKPrivate<PUB>* qctk_d();
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Returns a const pointer to the private class.
  * Returns a const pointer to the private class.
  *
  *
  * This function is only available in a class using \a QCTK_DECLARE_PRIVATE.
  * This function is only available in a class using \a QCTK_DECLARE_PRIVATE.
@@ -153,7 +153,7 @@ qCTKPrivate<PUB>* qctk_d();
  */
  */
 const qCTKPrivate<PUB>* qctk_d();
 const qCTKPrivate<PUB>* qctk_d();
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Returns a reference or pointer to the public class.
  * Returns a reference or pointer to the public class.
  *
  *
  * This function is only available in a class using \a QCTK_DECLARE_PUBLIC.
  * This function is only available in a class using \a QCTK_DECLARE_PUBLIC.
@@ -161,7 +161,7 @@ const qCTKPrivate<PUB>* qctk_d();
 PUB& qctk_p_ref();
 PUB& qctk_p_ref();
 PUB* qctk_p();
 PUB* qctk_p();
 
 
-/*! \relates qCTKPimpl
+/*! \relates ctkPimpl
  * Returns a const reference or pointer to the public class.
  * Returns a const reference or pointer to the public class.
  *
  *
  * This function is only available in a class using \a QCTK_DECLARE_PUBLIC.
  * This function is only available in a class using \a QCTK_DECLARE_PUBLIC.

+ 4 - 4
Libs/Core/qCTKUtils.cxx

@@ -12,13 +12,13 @@
 
 
 =========================================================================*/
 =========================================================================*/
 
 
-#include "qCTKUtils.h"
+#include "ctkUtils.h"
 
 
 // STD includes
 // STD includes
 #include <algorithm>
 #include <algorithm>
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
-void qCTKUtils::qListToSTLVector(const QStringList& list,
+void ctkUtils::qListToSTLVector(const QStringList& list,
                                  std::vector<char*>& vector)
                                  std::vector<char*>& vector)
 {
 {
   // Resize if required
   // Resize if required
@@ -46,7 +46,7 @@ static std::string qStringToSTLString(const QString& qstring)
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
-void qCTKUtils::qListToSTLVector(const QStringList& list,
+void ctkUtils::qListToSTLVector(const QStringList& list,
                                  std::vector<std::string>& vector)
                                  std::vector<std::string>& vector)
 {
 {
   // To avoid unnessesary relocations, let's reserve the required amount of space
   // To avoid unnessesary relocations, let's reserve the required amount of space
@@ -55,7 +55,7 @@ void qCTKUtils::qListToSTLVector(const QStringList& list,
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
-void qCTKUtils::stlVectorToQList(const std::vector<std::string>& vector,
+void ctkUtils::stlVectorToQList(const std::vector<std::string>& vector,
                                  QStringList& list)
                                  QStringList& list)
 {
 {
   std::transform(vector.begin(),vector.end(),std::back_inserter(list),&QString::fromStdString);
   std::transform(vector.begin(),vector.end(),std::back_inserter(list),&QString::fromStdString);

+ 6 - 6
Libs/Core/qCTKUtils.h

@@ -12,8 +12,8 @@
 
 
 =========================================================================*/
 =========================================================================*/
 
 
-#ifndef __qCTKUtils_h
-#define __qCTKUtils_h
+#ifndef __ctkUtils_h
+#define __ctkUtils_h
 
 
 // QT includes
 // QT includes
 #include <QStringList>
 #include <QStringList>
@@ -23,11 +23,11 @@
 
 
 #include "CTKCoreExport.h"
 #include "CTKCoreExport.h"
 
 
-class Q_CTK_CORE_EXPORT qCTKUtils
+class Q_CTK_CORE_EXPORT ctkUtils
 {
 {
   
   
 public:
 public:
-  typedef qCTKUtils Self;
+  typedef ctkUtils Self;
 
 
   ///
   ///
   /// Convert a QStringList to Vector of char*
   /// Convert a QStringList to Vector of char*
@@ -44,8 +44,8 @@ public:
 
 
 private:
 private:
   /// Not implemented
   /// Not implemented
-  qCTKUtils(){}
-  virtual ~qCTKUtils(){}
+  ctkUtils(){}
+  virtual ~ctkUtils(){}
 
 
 };
 };
 
 

+ 1 - 1
Libs/DICOM/Core/qCTKDCMTK.h

@@ -6,7 +6,7 @@
 #include <QSqlDatabase>
 #include <QSqlDatabase>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMCoreExport.h"
 #include "CTKDICOMCoreExport.h"
 
 

+ 1 - 1
Libs/DICOM/Core/qCTKDCMTKIndexer.h

@@ -5,7 +5,7 @@
 #include <QSqlDatabase>
 #include <QSqlDatabase>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMCoreExport.h"
 #include "CTKDICOMCoreExport.h"
 
 

+ 1 - 1
Libs/DICOM/Core/qCTKDCMTKModel.h

@@ -5,7 +5,7 @@
 #include <QAbstractItemModel>
 #include <QAbstractItemModel>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMCoreExport.h"
 #include "CTKDICOMCoreExport.h"
 
 

+ 1 - 1
Libs/DICOM/Widgets/qCTKDCMTKDICOMItemTreeModel.h

@@ -6,7 +6,7 @@
 #include <QModelIndex>
 #include <QModelIndex>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMWidgetsExport.h"
 #include "CTKDICOMWidgetsExport.h"
 
 

+ 1 - 1
Libs/DICOM/Widgets/qCTKDCMTKListenerWidget.h

@@ -5,7 +5,7 @@
 #include <QWidget>
 #include <QWidget>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMWidgetsExport.h"
 #include "CTKDICOMWidgetsExport.h"
 
 

+ 1 - 1
Libs/DICOM/Widgets/qCTKDCMTKLocationWidget.h

@@ -5,7 +5,7 @@
 #include <QWidget>
 #include <QWidget>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMWidgetsExport.h"
 #include "CTKDICOMWidgetsExport.h"
 
 

+ 1 - 1
Libs/DICOM/Widgets/qCTKDCMTKQueryRetrieveWidget.h

@@ -5,7 +5,7 @@
 #include <QWidget>
 #include <QWidget>
 
 
 // qCTK includes
 // qCTK includes
-#include <qCTKPimpl.h>
+#include <ctkPimpl.h>
 
 
 #include "CTKDICOMWidgetsExport.h"
 #include "CTKDICOMWidgetsExport.h"
 
 

+ 3 - 3
Libs/Widgets/CMakeLists.txt

@@ -12,13 +12,13 @@ SET(KIT_include_directories
   
   
 # Source files
 # Source files
 SET(KIT_SRCS
 SET(KIT_SRCS
-  qCTKSettings.cxx
-  qCTKSettings.h
+  ctkSettings.cxx
+  ctkSettings.h
   )
   )
 
 
 # Headers that should run through moc
 # Headers that should run through moc
 SET(KIT_MOC_SRCS
 SET(KIT_MOC_SRCS
-  qCTKSettings.h
+  ctkSettings.h
   )
   )
 
 
 # UI files
 # UI files

+ 7 - 7
Libs/Widgets/qCTKSettings.cxx

@@ -42,7 +42,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 =========================================================================*/
 =========================================================================*/
-#include "qCTKSettings.h"
+#include "ctkSettings.h"
 
 
 // QT includes
 // QT includes
 #include <QDialog>
 #include <QDialog>
@@ -50,7 +50,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <QDesktopWidget>
 #include <QDesktopWidget>
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-qCTKSettings::qCTKSettings(
+ctkSettings::ctkSettings(
     const QString& organization, 
     const QString& organization, 
     const QString& application,
     const QString& application,
     QObject* p) :
     QObject* p) :
@@ -59,13 +59,13 @@ qCTKSettings::qCTKSettings(
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void qCTKSettings::alertSettingsModified()
+void ctkSettings::alertSettingsModified()
 {
 {
   emit this->modified();
   emit this->modified();
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void qCTKSettings::saveState(const QMainWindow& window, const QString& key)
+void ctkSettings::saveState(const QMainWindow& window, const QString& key)
 {
 {
   this->beginGroup(key);
   this->beginGroup(key);
   this->setValue("Position", window.pos());
   this->setValue("Position", window.pos());
@@ -75,7 +75,7 @@ void qCTKSettings::saveState(const QMainWindow& window, const QString& key)
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void qCTKSettings::saveState(const QDialog& dialog, const QString& key)
+void ctkSettings::saveState(const QDialog& dialog, const QString& key)
 {
 {
   this->beginGroup(key);
   this->beginGroup(key);
   this->setValue("Position", dialog.pos());
   this->setValue("Position", dialog.pos());
@@ -84,7 +84,7 @@ void qCTKSettings::saveState(const QDialog& dialog, const QString& key)
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void qCTKSettings::restoreState(const QString& key, QMainWindow& window)
+void ctkSettings::restoreState(const QString& key, QMainWindow& window)
 {
 {
   this->beginGroup(key);
   this->beginGroup(key);
   
   
@@ -123,7 +123,7 @@ void qCTKSettings::restoreState(const QString& key, QMainWindow& window)
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void qCTKSettings::restoreState(const QString& key, QDialog& dialog)
+void ctkSettings::restoreState(const QString& key, QDialog& dialog)
 {
 {
   this->beginGroup(key);
   this->beginGroup(key);
   
   

+ 5 - 5
Libs/Widgets/qCTKSettings.h

@@ -43,12 +43,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 =========================================================================*/
 =========================================================================*/
 
 
-/// \file qCTKSettings.h
+/// \file ctkSettings.h
 ///
 ///
 /// \date 02/03/2010
 /// \date 02/03/2010
 
 
-#ifndef __qCTKSettings_h
-#define __qCTKSettings_h
+#ifndef __ctkSettings_h
+#define __ctkSettings_h
 
 
 // QT includes
 // QT includes
 #include <QSettings>
 #include <QSettings>
@@ -58,12 +58,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 class QDialog;
 class QDialog;
 class QMainWindow;
 class QMainWindow;
 
 
-class Q_CTK_WIDGETS_EXPORT qCTKSettings : public QSettings
+class Q_CTK_WIDGETS_EXPORT ctkSettings : public QSettings
 {
 {
   Q_OBJECT
   Q_OBJECT
 
 
 public:
 public:
-  qCTKSettings(
+  ctkSettings(
     const QString& organization,
     const QString& organization,
     const QString& application,
     const QString& application,
     QObject* p);
     QObject* p);