From 6cf7f854bb8536b3f5d8b1f08bef20bcae016683 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 2 Feb 2016 14:11:25 +0300 Subject: [PATCH] Updates from V7_dev branch --- src/GLViewer/GLViewer_BaseObjects.cxx | 9 +- src/GLViewer/GLViewer_ToolTip.cxx | 2 +- src/HelpBrowser/CMakeLists.txt | 2 +- src/HelpBrowser/qtlockedfile_win.cpp | 10 +- src/LightApp/LightApp_Application.cxx | 2 +- src/LightApp/LightApp_ModuleAction.cxx | 2 +- src/LightApp/LightApp_Operation.cxx | 4 +- .../OCCViewer_ClipPlaneInteractor.cxx | 6 +- src/PyViewer/PyViewer_ViewWindow.cxx | 3 +- src/Qtx/QtxActionToolMgr.cxx | 2 +- src/Qtx/QtxDialog.cxx | 2 +- src/Qtx/QtxDockAction.cxx | 4 +- src/Qtx/QtxMainWindow.cxx | 2 +- src/Qtx/QtxSearchTool.cxx | 10 +- src/Qtx/QtxWorkstack.cxx | 4 +- src/Qtx/QtxWorkstackAction.cxx | 4 +- .../SALOME_PYQT_GUILight.sip | 2 +- src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip | 2 +- src/STD/STD_Application.cxx | 12 +-- src/SUIT/SUIT_ActionOperation.cxx | 2 +- src/SUIT/SUIT_Application.cxx | 18 ++-- src/SUIT/SUIT_Application.h | 2 +- src/SUIT/SUIT_DataObjectKey.cxx | 6 +- src/SUIT/SUIT_Operation.cxx | 38 ++++---- src/SUIT/SUIT_Study.cxx | 26 +++--- src/SalomeApp/SalomeApp_Application.cxx | 4 +- src/SalomeApp/pluginsdemo/minmax_dialog.py | 91 ------------------- src/Session/SALOME_Session_Server.cxx | 8 +- src/TreeData/Test/mainwindow.cxx | 2 +- src/TreeData/TreeModel.cxx | 2 - src/VTKViewer/VTKViewer_Filter.cxx | 2 +- src/VTKViewer/VTKViewer_InteractorStyle.cxx | 4 +- tools/dlgfactory/GenericDialog.cxx | 9 +- tools/dlgfactory/GenericDialog.h | 25 ++--- tools/dlgfactory/__GDIALOG__.cxx | 2 +- tools/dlgfactory/__GDIALOG__.h | 11 +-- tools/dlgfactory/__QDIALOG__.cxx | 4 +- tools/dlgfactory/__QDIALOG__.h | 20 ++-- tools/dlgfactory/gtester.cxx | 5 +- tools/dlgfactory/qtester.cxx | 5 +- 40 files changed, 139 insertions(+), 231 deletions(-) delete mode 100644 src/SalomeApp/pluginsdemo/minmax_dialog.py diff --git a/src/GLViewer/GLViewer_BaseObjects.cxx b/src/GLViewer/GLViewer_BaseObjects.cxx index 6127c02df..4151e0eb6 100644 --- a/src/GLViewer/GLViewer_BaseObjects.cxx +++ b/src/GLViewer/GLViewer_BaseObjects.cxx @@ -1438,16 +1438,15 @@ bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC y = double( yPos ); aViewerCS->transform( *aEMFCS, x, y ); - const char* str = aText.toLatin1().data(); int nHeight = 35*14; // height of font int nWidth = 35*12; // average character width int nEscapement = 0; // angle of escapement int nOrientation = 0; // base-line orientation angle int fnWeight = FW_NORMAL; // font weight - DWORD fdwItalic = FALSE; // italic attribute option - DWORD fdwUnderline = FALSE; // underline attribute option - DWORD fdwStrikeOut = FALSE; // strikeout attribute option + DWORD fdwItalic = false; // italic attribute option + DWORD fdwUnderline = false; // underline attribute option + DWORD fdwStrikeOut = false; // strikeout attribute option DWORD fdwCharSet = ANSI_CHARSET; // character set identifier DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS; // output precision DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision @@ -1467,7 +1466,7 @@ bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC HGDIOBJ old1 = SelectObject( dc, aFont ); HGDIOBJ old2 = SelectObject( dc, aBrush ); - TextOut( dc, x, y, str, aText.length() ); + TextOut( dc, x, y, aText.toLatin1().constData(), aText.length() ); SelectObject ( dc, old1 ); SelectObject ( dc, old2 ); diff --git a/src/GLViewer/GLViewer_ToolTip.cxx b/src/GLViewer/GLViewer_ToolTip.cxx index 632062d00..3d5653cb2 100644 --- a/src/GLViewer/GLViewer_ToolTip.cxx +++ b/src/GLViewer/GLViewer_ToolTip.cxx @@ -52,7 +52,7 @@ GLViewer_ObjectTip::GLViewer_ObjectTip( GLViewer_ViewPort2d* theParent ) Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool | Qt::X11BypassWindowManagerHint ); mypLabel->setObjectName("ObjectTipText"); mypLabel->setMargin( 1 ); - //mypLabel->setAutoMask( FALSE ); + //mypLabel->setAutoMask( false ); mypLabel->setFrameStyle( QFrame::Plain | QFrame::Box ); mypLabel->setLineWidth( 1 ); mypLabel->setAlignment( Qt::AlignAbsolute | Qt::AlignTop ); diff --git a/src/HelpBrowser/CMakeLists.txt b/src/HelpBrowser/CMakeLists.txt index f67b5814e..6e38bb16b 100644 --- a/src/HelpBrowser/CMakeLists.txt +++ b/src/HelpBrowser/CMakeLists.txt @@ -78,4 +78,4 @@ SET(HelpBrowser_SOURCES ADD_EXECUTABLE(HelpBrowser ${HelpBrowser_SOURCES}) TARGET_LINK_LIBRARIES(HelpBrowser ${_link_LIBRARIES}) -INSTALL(TARGETS HelpBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) \ No newline at end of file +INSTALL(TARGETS HelpBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/src/HelpBrowser/qtlockedfile_win.cpp b/src/HelpBrowser/qtlockedfile_win.cpp index 049acaffe..a86bf3d51 100644 --- a/src/HelpBrowser/qtlockedfile_win.cpp +++ b/src/HelpBrowser/qtlockedfile_win.cpp @@ -63,16 +63,16 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) Qt::HANDLE mutex; if (doCreate) { - QT_WA( { mutex = CreateMutexW(NULL, FALSE, (LPCWSTR)mname.utf16()); }, - { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } ); + QT_WA( { mutex = CreateMutexW(NULL, false, (LPCWSTR)mname.utf16()); }, + { mutex = CreateMutexA(NULL, false, mname.toLocal8Bit().constData()); } ); if (!mutex) { qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); return 0; } } else { - QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16()); }, - { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } ); + QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, false, (LPCWSTR)mname.utf16()); }, + { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, false, mname.toLocal8Bit().constData()); } ); if (!mutex) { if (GetLastError() != ERROR_FILE_NOT_FOUND) qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); @@ -159,7 +159,7 @@ bool QtLockedFile::lock(LockMode mode, bool block) } if (rmutexes.size()) { DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(), - TRUE, block ? INFINITE : 0); + true, block ? INFINITE : 0); if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) { if (res != WAIT_TIMEOUT) qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed"); diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index c800af179..f82e64e78 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -4022,7 +4022,7 @@ void LightApp_Application::loadDockWindowsState() } if(dwMap) { - QList dwList = qFindChildren( desktop() ); + QList dwList = desktop()->findChildren(); for ( QList::iterator dit = dwList.begin(); dit != dwList.end(); ++dit ) { QDockWidget* dw = *dit; diff --git a/src/LightApp/LightApp_ModuleAction.cxx b/src/LightApp/LightApp_ModuleAction.cxx index 74513caf9..346d271e9 100755 --- a/src/LightApp/LightApp_ModuleAction.cxx +++ b/src/LightApp/LightApp_ModuleAction.cxx @@ -146,7 +146,7 @@ QList LightApp_ModuleAction::ComboAction::widgets() const QList wlist = createdWidgets(); for ( QList::const_iterator wit = wlist.begin(); wit != wlist.end(); ++wit ) - lst += (*wit)->findChildren(); + lst += (*wit)->findChildren(); return lst; } diff --git a/src/LightApp/LightApp_Operation.cxx b/src/LightApp/LightApp_Operation.cxx index 3bdd29f7c..697cb14b5 100755 --- a/src/LightApp/LightApp_Operation.cxx +++ b/src/LightApp/LightApp_Operation.cxx @@ -36,7 +36,7 @@ /*! * \brief Constructor * -* Constructor sets myModule in NULL and myIsAutoResumed in TRUE +* Constructor sets myModule in NULL and myIsAutoResumed in \c true */ LightApp_Operation::LightApp_Operation() : SUIT_Operation( 0 ), @@ -278,7 +278,7 @@ void LightApp_Operation::setDialogActive( const bool active ) * Autoresume property is used during automatic resuming operation. If operation is * suspended and cursor is moved above dialog of the operation then operation is resumed * automatically (if possible). It can be resumed only program call otherwise (see -* LightApp_SwitchOp for more description). This property is TRUE by default and may be +* LightApp_SwitchOp for more description). This property is \c true by default and may be * changed with setAutoResumed() method call. */ bool LightApp_Operation::isAutoResumed() const diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx index b4ffbd215..c11065772 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx @@ -110,7 +110,7 @@ void OCCViewer_ClipPlaneInteractor::setEnabled( const bool theIsEnabled ) /*! \brief Checks whether the interactive operation is in progress. - \return TRUE if the interaction is performed on IO object meaning + \return \c true if the interaction is performed on IO object meaning that no other operations in viewer should be processed. */ bool OCCViewer_ClipPlaneInteractor::isPerforming() const @@ -120,7 +120,7 @@ bool OCCViewer_ClipPlaneInteractor::isPerforming() const /*! \brief Checks whether the interactive plane can be clicked. - \return TRUE if the click interaction is supported for the plane. + \return \c true if the click interaction is supported for the plane. */ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePlane ) { @@ -151,7 +151,7 @@ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePla /*! \brief Checks whether the interactive plane can be dragged. - \return TRUE if the dragging interaction is supported for the plane. + \return \c true if the dragging interaction is supported for the plane. */ bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePlane ) { diff --git a/src/PyViewer/PyViewer_ViewWindow.cxx b/src/PyViewer/PyViewer_ViewWindow.cxx index 47a9a4582..ea300e42c 100644 --- a/src/PyViewer/PyViewer_ViewWindow.cxx +++ b/src/PyViewer/PyViewer_ViewWindow.cxx @@ -33,12 +33,13 @@ #include #include -#include #include #include #include #include +#include #include +#include /*! \class PyViewer_ViewWindow diff --git a/src/Qtx/QtxActionToolMgr.cxx b/src/Qtx/QtxActionToolMgr.cxx index c24a5820a..4c368f609 100644 --- a/src/Qtx/QtxActionToolMgr.cxx +++ b/src/Qtx/QtxActionToolMgr.cxx @@ -229,7 +229,7 @@ QToolBar* QtxActionToolMgr::find( const QString& title, QMainWindow* mw ) const QString pattern = title.toLower(); QToolBar* res = 0; - QList toolbars = mw->findChildren( ); + QList toolbars = mw->findChildren(); for ( QList::iterator it = toolbars.begin(); it != toolbars.end() && !res; ++it ) { if ( (*it)->windowTitle().toLower() == pattern ) diff --git a/src/Qtx/QtxDialog.cxx b/src/Qtx/QtxDialog.cxx index 47a3a2867..614831777 100755 --- a/src/Qtx/QtxDialog.cxx +++ b/src/Qtx/QtxDialog.cxx @@ -1327,7 +1327,7 @@ void QtxDialog::keyPressEvent( QKeyEvent* e ) if ( e->key() == Qt::Key_Tab && e->modifiers() & Qt::ControlModifier ) { - QObject* tab = this->findChild( ); + QObject* tab = this->findChild(); if ( tab && !property( "in_tab_event" ).toBool() ) { setProperty( "in_tab_event", true ); QApplication::sendEvent( tab, e ); diff --git a/src/Qtx/QtxDockAction.cxx b/src/Qtx/QtxDockAction.cxx index 9e741adaf..946279d9e 100755 --- a/src/Qtx/QtxDockAction.cxx +++ b/src/Qtx/QtxDockAction.cxx @@ -152,7 +152,7 @@ void QtxDockAction::toolBars( QList& lst ) const if ( !mw ) return; - QList toolbars = mw->findChildren( ); + QList toolbars = mw->findChildren(); for ( QList::iterator it = toolbars.begin(); it != toolbars.end(); ++it ) { QToolBar* tb = *it; @@ -173,7 +173,7 @@ void QtxDockAction::dockWidgets( QList& lst ) const if ( !mw ) return; - QList dockwidgets = mw->findChildren( ); + QList dockwidgets = mw->findChildren(); for ( QList::iterator it = dockwidgets.begin(); it != dockwidgets.end(); ++it ) { QDockWidget* dw = *it; diff --git a/src/Qtx/QtxMainWindow.cxx b/src/Qtx/QtxMainWindow.cxx index c71fec882..1e1bf6641 100644 --- a/src/Qtx/QtxMainWindow.cxx +++ b/src/Qtx/QtxMainWindow.cxx @@ -215,7 +215,7 @@ void QtxMainWindow::Resizer::setFilters( bool on ) myMain->layout()->removeEventFilter( this ); } - QTimer* t = myMain->layout()->findChild( ); + QTimer* t = myMain->layout()->findChild(); if ( t ) { if ( on ) t->installEventFilter( this ); diff --git a/src/Qtx/QtxSearchTool.cxx b/src/Qtx/QtxSearchTool.cxx index da6cfe1fe..df9760bb4 100644 --- a/src/Qtx/QtxSearchTool.cxx +++ b/src/Qtx/QtxSearchTool.cxx @@ -886,7 +886,7 @@ void QtxSearchTool::init( Qt::Orientation orientation ) myModWidget_layout->setMargin( 0 ); myClose = new QToolButton( myBtnWidget ); - myClose->setIcon( QIcon( QPixmap( close_xpm ) ) ); + myClose->setIcon( QPixmap( close_xpm ) ); myClose->setAutoRaise( true ); myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myClose ) ); connect( myClose, SIGNAL( clicked() ), this, SLOT( hide() ) ); @@ -899,28 +899,28 @@ void QtxSearchTool::init( Qt::Orientation orientation ) myData->installEventFilter( this ); myToFirst = new QToolButton( myBtnWidget ); - myToFirst->setIcon( QIcon( QPixmap( first_xpm ) ) ); + myToFirst->setIcon( QPixmap( first_xpm ) ); myToFirst->setAutoRaise( true ); myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myToFirst ), 0 ); connect( myToFirst, SIGNAL( clicked() ), this, SLOT( findFirst() ) ); myToFirst->installEventFilter( this ); myPrev = new QToolButton( myBtnWidget ); - myPrev->setIcon( QIcon( QPixmap( prev_xpm ) ) ); + myPrev->setIcon( QPixmap( prev_xpm ) ); myPrev->setAutoRaise( true ); myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myPrev ), 0 ); connect( myPrev, SIGNAL( clicked() ), this, SLOT( findPrevious() ) ); myPrev->installEventFilter( this ); myNext = new QToolButton( myBtnWidget ); - myNext->setIcon( QIcon( QPixmap( next_xpm ) ) ); + myNext->setIcon( QPixmap( next_xpm ) ); myNext->setAutoRaise( true ); myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myNext ), 0 ); connect( myNext, SIGNAL( clicked() ), this, SLOT( findNext() ) ); myNext->installEventFilter( this ); myToLast = new QToolButton( myBtnWidget ); - myToLast->setIcon( QIcon( QPixmap( last_xpm ) ) ); + myToLast->setIcon( QPixmap( last_xpm ) ); myToLast->setAutoRaise( true ); myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myToLast ), 0 ); connect( myToLast, SIGNAL( clicked() ), this, SLOT( findLast() ) ); diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index dd071fe5f..6dbde0d23 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -3309,7 +3309,7 @@ QtxWorkstackArea* QtxWorkstack::wgArea( QWidget* wid ) const \param wid_to widget specified the destination area \param before specifies whether the first widget has to be moved before or after the second widget - \return TRUE if operation is completed successfully, FALSE otherwise + \return \c true if operation is completed successfully, \c false otherwise */ bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before ) { @@ -3345,7 +3345,7 @@ bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before ) /*! \brief Group all windows in one area - \return TRUE if operation is completed successfully, FALSE otherwise + \return \c true if operation is completed successfully, \c false otherwise */ void QtxWorkstack::stack() { diff --git a/src/Qtx/QtxWorkstackAction.cxx b/src/Qtx/QtxWorkstackAction.cxx index ab2e4a61c..3b4855075 100644 --- a/src/Qtx/QtxWorkstackAction.cxx +++ b/src/Qtx/QtxWorkstackAction.cxx @@ -524,12 +524,12 @@ QtxSplitDlg::QtxSplitDlg( QWidget* parent, QtxWorkstack* workstack, QtxSplitDlgM // Buttons for possibility of switching the variants of split myButtonPrevious = new QPushButton( this ); - myButtonPrevious->setIcon( QIcon( QPixmap( prev_xpm ) ) ); + myButtonPrevious->setIcon( QPixmap( prev_xpm ) ); myButtonPrevious->setAutoDefault(true); myButtonPrevious->setEnabled( false ); myButtonNext = new QPushButton( this ); - myButtonNext->setIcon( QIcon( QPixmap( next_xpm ) ) ); + myButtonNext->setIcon( QPixmap( next_xpm ) ); myButtonNext->setAutoDefault(true); myButtonNext->setEnabled( false ); diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_GUILight.sip b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_GUILight.sip index a38add5af..54dbbb63c 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_GUILight.sip +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_GUILight.sip @@ -22,8 +22,8 @@ %Module SalomePyQtGUILight -%Import QtGui/QtGuimod.sip %Import QtCore/QtCoremod.sip +%Import QtGui/QtGuimod.sip %If (Qt_5_0_0 -) %Import QtWidgets/QtWidgetsmod.sip %End diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip index 54490bf0c..92af427ab 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip @@ -28,8 +28,8 @@ %Feature ENABLE_CORBA %Feature ENABLE_PLOT2D -%Import QtGui/QtGuimod.sip %Import QtCore/QtCoremod.sip +%Import QtGui/QtGuimod.sip %If (Qt_5_0_0 -) %Import QtWidgets/QtWidgetsmod.sip %End diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 3ec5a29d6..f2815832e 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -321,7 +321,7 @@ void STD_Application::onOpenDoc() onOpenDoc( aName ); } -/*! \retval true, if document was opened successful, else false.*/ +/*! \retval \c true, if document was opened successful, else \c false.*/ bool STD_Application::onOpenDoc( const QString& aName ) { if ( !abortAllOperations() ) @@ -457,7 +457,7 @@ bool STD_Application::closeActiveDoc( bool permanently ) } /*!Check the application on closing. - * \retval true if possible, else false + * \retval \c true if possible, else \c false */ bool STD_Application::isPossibleToClose( bool& closePermanently ) { @@ -598,7 +598,7 @@ void STD_Application::onSaveDoc() onSaveAsDoc(); } -/*! \retval TRUE, if doument saved successful, else FALSE.*/ +/*! \retval \c true, if document saved successfully, else \c false.*/ bool STD_Application::onSaveAsDoc() { SUIT_Study* study = activeStudy(); @@ -669,7 +669,7 @@ void STD_Application::setEditEnabled( bool theEnable ) } } -/*!\retval true, if document opened successful, else false.*/ +/*!\retval \c true, if document opened successfully, else \c false.*/ bool STD_Application::useFile(const QString& theFileName) { bool res = SUIT_Application::useFile( theFileName ); @@ -819,7 +819,7 @@ void STD_Application::clearViewManagers() } } -/*!\retval TRUE, if view manager \a vm, already in view manager list (\a myViewMgrs).*/ +/*!\retval \c true, if view manager \a vm, already in view manager list (\a myViewMgrs).*/ bool STD_Application::containsViewManager( SUIT_ViewManager* vm ) const { return myViewMgrs.contains( vm ); @@ -831,7 +831,7 @@ void STD_Application::onViewManagerActivated( SUIT_ViewManager* vm ) setActiveViewManager( vm ); } -/*!Sets status bar show, if \on = true, else status bar hide.*/ +/*!Shows status bar, if on is \c true, else hides status bar.*/ void STD_Application::onViewStatusBar( bool on ) { if ( on ) diff --git a/src/SUIT/SUIT_ActionOperation.cxx b/src/SUIT/SUIT_ActionOperation.cxx index cf3a9e964..1a42e6bb7 100644 --- a/src/SUIT/SUIT_ActionOperation.cxx +++ b/src/SUIT/SUIT_ActionOperation.cxx @@ -84,7 +84,7 @@ void SUIT_ActionOperation::setAction( QtxAction* a ) } /*! Add action to widget \a wid. - *\retval TRUE - successful, FALSE - not successful. + *\retval true - successful, false - not successful. */ bool SUIT_ActionOperation::addTo( QWidget* wid ) { diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index e978085bb..67ecd17fb 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -85,8 +85,8 @@ SUIT_Desktop* SUIT_Application::desktop() } /*! - \return FALSE if application can not be closed (because of non saved data for example). - This method called by SUIT_Session whin closing of application was requested. + \return \c false if application can not be closed (because of non saved data for example). + This method called by SUIT_Session when closing of application was requested. */ bool SUIT_Application::isPossibleToClose( bool& ) { @@ -506,7 +506,7 @@ int SUIT_Application::createMenu( const int id, const QString& menu, const int g /*! Show/hide menu item corresponding to action \param a - action - \param on - if it is true, the item will be shown, otherwise it will be hidden + \param on - if it is \c true, the item will be shown, otherwise it will be hidden */ void SUIT_Application::setMenuShown( QAction* a, const bool on ) { @@ -521,7 +521,7 @@ void SUIT_Application::setMenuShown( QAction* a, const bool on ) /*! Show/hide menu item corresponding to action \param id - identificator of action in menu manager - \param on - if it is true, the item will be shown, otherwise it will be hidden + \param on - if it is \c true, the item will be shown, otherwise it will be hidden */ void SUIT_Application::setMenuShown( const int id, const bool on ) { @@ -531,7 +531,7 @@ void SUIT_Application::setMenuShown( const int id, const bool on ) /*! Show/hide tool button corresponding to action \param a - action - \param on - if it is true, the button will be shown, otherwise it will be hidden + \param on - if it is \c true, the button will be shown, otherwise it will be hidden */ void SUIT_Application::setToolShown( QAction* a, const bool on ) { @@ -546,7 +546,7 @@ void SUIT_Application::setToolShown( QAction* a, const bool on ) /*! Show/hide menu item corresponding to action \param id - identificator of action in tool manager - \param on - if it is true, the button will be shown, otherwise it will be hidden + \param on - if it is \c true, the button will be shown, otherwise it will be hidden */ void SUIT_Application::setToolShown( const int id, const bool on ) { @@ -556,7 +556,7 @@ void SUIT_Application::setToolShown( const int id, const bool on ) /*! Show/hide both menu item and tool button corresponding to action \param a - action - \param on - if it is true, the item will be shown, otherwise it will be hidden + \param on - if it is \c true, the item will be shown, otherwise it will be hidden */ void SUIT_Application::setActionShown( QAction* a, const bool on ) { @@ -567,7 +567,7 @@ void SUIT_Application::setActionShown( QAction* a, const bool on ) /*! Show/hide both menu item and tool button corresponding to action \param id - identificator in both menu manager and tool manager - \param on - if it is true, the item will be shown, otherwise it will be hidden + \param on - if it is \c true, the item will be shown, otherwise it will be hidden */ void SUIT_Application::setActionShown( const int id, const bool on ) { @@ -622,7 +622,7 @@ QList SUIT_Application::actionIds() const \param tip - tool tip \param key - shortcut \param parent - parent object - \param toggle - if it is TRUE the action will be a toggle action, otherwise it will be a command action + \param toggle - if it is \c true the action will be a toggle action, otherwise it will be a command action \param reciever - object that contains slot \param member - slot to be called when action is activated */ diff --git a/src/SUIT/SUIT_Application.h b/src/SUIT/SUIT_Application.h index 1d80b8d0a..f19134dca 100755 --- a/src/SUIT/SUIT_Application.h +++ b/src/SUIT/SUIT_Application.h @@ -68,7 +68,7 @@ public: //! Returns main widget (Desktop) of the application (if it exists) virtual SUIT_Desktop* desktop(); - /*! Returns FALSE if application can not be closed (because of non saved data for example). + /*! Returns \c false if application can not be closed (because of non saved data for example). This method called by SUIT_Session whin closing of application was requested. */ virtual bool isPossibleToClose( bool& ); diff --git a/src/SUIT/SUIT_DataObjectKey.cxx b/src/SUIT/SUIT_DataObjectKey.cxx index cabf0085e..29c799efd 100755 --- a/src/SUIT/SUIT_DataObjectKey.cxx +++ b/src/SUIT/SUIT_DataObjectKey.cxx @@ -93,7 +93,7 @@ SUIT_DataObjectKeyHandle::~SUIT_DataObjectKeyHandle() /*! * Checks: Is key null? - *\retval TRUE - if null, esle false. + *\retval \c true - if null, esle \c false. */ bool SUIT_DataObjectKeyHandle::isNull() const { @@ -110,7 +110,7 @@ void SUIT_DataObjectKeyHandle::nullify() /*! * Operator less. - *\retval boolean. TRUE - If current key less than \a kw. + *\retval boolean. \c true - If current key less than \a kw. */ bool SUIT_DataObjectKeyHandle::operator<( const SUIT_DataObjectKeyHandle& kw ) const { @@ -134,7 +134,7 @@ bool SUIT_DataObjectKeyHandle::operator<( const SUIT_DataObjectKeyHandle& kw ) c /*! * Operator is equal. - *\retval boolean. TRUE - If current key equal \a kw. + *\retval boolean. \c true - If current key equal \a kw. */ bool SUIT_DataObjectKeyHandle::operator==( const SUIT_DataObjectKeyHandle& kw ) const { diff --git a/src/SUIT/SUIT_Operation.cxx b/src/SUIT/SUIT_Operation.cxx index 41749ff44..48f92b96a 100755 --- a/src/SUIT/SUIT_Operation.cxx +++ b/src/SUIT/SUIT_Operation.cxx @@ -142,7 +142,7 @@ void SUIT_Operation::clearFlags( const int f ) * \brief Test the flags of operation * \param f - flags of operation to be tested * -* Returns TRUE if the specified flags setted in the operation (see Flags enumeration) +* Returns \c true if the specified flags setted in the operation (see Flags enumeration) */ bool SUIT_Operation::testFlags( const int f ) const { @@ -262,9 +262,9 @@ void SUIT_Operation::suspend() /*! * \brief Verifies whether operator is ready to start. - * \return TRUE if operation is ready to start + * \return \c true if operation is ready to start * -* Default implementation returns TRUE. Redefine this method to add own verifications +* Default implementation returns \c true. Redefine this method to add own verifications */ bool SUIT_Operation::isReadyToStart() const { @@ -329,14 +329,14 @@ void SUIT_Operation::commitOperation() /*! * \brief Sets slot which is called when operation is started - * \param theReceiver - object containing slot - * \param theSlot - slot of theReceiver object - * \return TR if slot was connected successfully, FALSE otherwise -* -* Sets slot which is called when operation is started. There is no point in -* using this method. It would be better to inherit own operator from base -* one and redefine startOperation method -*/ + * \param theReceiver - object containing slot + * \param theSlot - slot of theReceiver object + * \return \c true if slot was connected successfully, \c false otherwise + * + * Sets slot which is called when operation is started. There is no point in + * using this method. It would be better to inherit own operator from base + * one and redefine startOperation method + */ bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot ) { return connect( this, SIGNAL( callSlot() ), theReceiver, theSlot ); @@ -345,7 +345,7 @@ bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot ) /*! * \brief Verifies whether given operator is valid for this one * \param theOtherOp - other operation - * \return Returns TRUE if the given operator is valid for this one + * \return Returns \c true if the given operator is valid for this one * * Verifies whether given operator is valid for this one (i.e. can be started "above" * this operator) @@ -357,10 +357,10 @@ bool SUIT_Operation::isValid( SUIT_Operation* ) const /*! * \brief Verifies whether this operator can be always started above any already runnig one - * \return Returns TRUE if current operation must not be checked for ActiveOperation->IsValid( this ) + * \return Returns \c true if current operation must not be checked for ActiveOperation->IsValid( this ) * * This method must be redefined in derived operation if operation of derived class -* must be always can start above any launched one. Default implementation returns FALSE, +* must be always can start above any launched one. Default implementation returns \c false, * so it is being checked for IsValid, but some operations may overload IsGranted() * In this case they will always start, no matter what operation is running. */ @@ -371,9 +371,9 @@ bool SUIT_Operation::isGranted() const /*! * \brief Verifies whether operation is an runned one (state()==Running) - * \return TRUE if operation is active, FALSE otherwise + * \return \c true if operation is active, \c false otherwise * -* Verifies whether operation is an running. Returns TRUE if state of operator +* Verifies whether operation is an running. Returns \c true if state of operator * is Running */ bool SUIT_Operation::isRunning() const @@ -383,9 +383,9 @@ bool SUIT_Operation::isRunning() const /*! * \brief Verifies whether operation is an active for study. - * \return TRUE if operation is active, FALSE otherwise + * \return \c true if operation is active, \c false otherwise * -* Verifies whether operation is an active on. Returns TRUE if this operator +* Verifies whether operation is an active on. Returns \c true if this operator * is active for study */ bool SUIT_Operation::isActive() const @@ -470,7 +470,7 @@ bool SUIT_Operation::commitTransaction( const QString& name ) } /*! - * \brief Returns TRUE if transaction is opened. + * \brief Returns \c true if transaction is opened. */ bool SUIT_Operation::hasTransaction() const { diff --git a/src/SUIT/SUIT_Study.cxx b/src/SUIT/SUIT_Study.cxx index 2d5c95514..3fe6234cc 100755 --- a/src/SUIT/SUIT_Study.cxx +++ b/src/SUIT/SUIT_Study.cxx @@ -96,7 +96,7 @@ SUIT_Operation* SUIT_Study::activeOperation() const } /*! - *\retval TRUE - if study saved, else FALSE. + *\retval \c true - if study saved, else \c false. */ bool SUIT_Study::isSaved() const { @@ -104,7 +104,7 @@ bool SUIT_Study::isSaved() const } /*! - *\retval TRUE - if study modified, else FALSE. + *\retval \c true - if study modified, else \c false. */ bool SUIT_Study::isModified() const { @@ -128,7 +128,7 @@ bool SUIT_Study::createDocument( const QString& ) } /*! - * Open document. Sets file name. return true. + * Open document. Sets file name. return \c true. */ bool SUIT_Study::openDocument( const QString& fileName ) { @@ -152,7 +152,7 @@ bool SUIT_Study::saveDocumentAs( const QString& fileName ) } /*! - *\retval TRUE - if document saved successful, else FALSE. + *\retval \c true - if document saved successful, else \c false. */ bool SUIT_Study::saveDocument() { @@ -266,13 +266,13 @@ SUIT_Operation* SUIT_Study::blockingOperation( SUIT_Operation* theOp ) const /*! * \brief Starts operation * \param theOp - operation to be started - * \param toCheck - if parameters is equal TRUE then checking performed whether + * \param toCheck - if parameters is equal \c true then checking performed whether * all already started operations allow to start this operation above them (default - * value is TRUE - * \return TRUE if operation is started, FALSE otherwise + * value is \c true + * \return \c true if operation is started, \c false otherwise * * Verifies whether theOp operation can be started above already started ones (if toCheck -* parameter is equal TRUE) and starts it +* parameter is equal \c true) and starts it */ bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck ) { @@ -320,7 +320,7 @@ bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck ) /*! * \brief Aborts operation * \param theOp - operation to be aborted - * \return TRUE if operation is aborted successfully + * \return \c true if operation is aborted successfully * * Verifies whether operation already started and aborts it in this case (sets execution * status to Rejected and stops operation) @@ -344,7 +344,7 @@ bool SUIT_Study::abort( SUIT_Operation* theOp ) /*! * \brief Commits operation * \param theOp - operation to be committed - * \return TRUE if operation is committed successfully + * \return \c true if operation is committed successfully * * Verifies whether operation already started and commits it in this case (sets execution * status to Accepted and stops operation) @@ -370,7 +370,7 @@ bool SUIT_Study::commit( SUIT_Operation* theOp ) /*! * \brief Commits operation * \param theOp - operation to be committed - * \return TRUE if operation is suspended successfully + * \return \c true if operation is suspended successfully * * Verifies whether operation already started and suspends it in this case. Operations * ususlly are suspended to start other one above them. @@ -390,7 +390,7 @@ bool SUIT_Study::suspend( SUIT_Operation* theOp ) /*! * \brief Resumes operation * \param theOp - operation to be resumed - * \return TRUE if operation is aborted successfully + * \return \c true if operation is aborted successfully * * Verifies whether operation already started but suspended and resumesit in this case. */ @@ -523,7 +523,7 @@ bool SUIT_Study::commitTransaction( const QString& ) } /*! - * \brief Returns TRUE if transaction is opened. + * \brief Returns \c true if transaction is opened. */ bool SUIT_Study::hasTransaction() const { diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index ef1cddd2a..8927c1630 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -209,7 +209,7 @@ void SalomeApp_Application::start() for (int i = 1; i < qApp->arguments().size(); i++) { QRegExp rxs ("--study-hdf=(.+)"); - if ( rxs.indexIn( QString(qApp->arguments()[i]) ) >= 0 && rxs.capturedTexts().count() > 1 ) { + if ( rxs.indexIn( qApp->arguments()[i] ) >= 0 && rxs.capturedTexts().count() > 1 ) { QString file = rxs.capturedTexts()[1]; QFileInfo fi ( file ); QString extension = fi.suffix().toLower(); @@ -218,7 +218,7 @@ void SalomeApp_Application::start() } else { QRegExp rxp ("--pyscript=\\[(.+)\\]"); - if ( rxp.indexIn( QString(qApp->arguments()[i]) ) >= 0 && rxp.capturedTexts().count() > 1 ) { + if ( rxp.indexIn( qApp->arguments()[i] ) >= 0 && rxp.capturedTexts().count() > 1 ) { // pyscript QStringList dictList = rxp.capturedTexts()[1].split("},", QString::SkipEmptyParts); for (int k = 0; k < dictList.count(); ++k) { diff --git a/src/SalomeApp/pluginsdemo/minmax_dialog.py b/src/SalomeApp/pluginsdemo/minmax_dialog.py deleted file mode 100644 index b5c5db667..000000000 --- a/src/SalomeApp/pluginsdemo/minmax_dialog.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# Form implementation generated from reading ui file 'minmax.ui' -# -# Created: Thu Mar 1 15:23:57 2012 -# by: PyQt4 UI code generator 4.8.1 -# -# WARNING! All changes made in this file will be lost! - -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s - -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) - Dialog.resize(178, 156) - Dialog.setSizeGripEnabled(True) - self.gridLayout = QtGui.QGridLayout(Dialog) - self.gridLayout.setObjectName(_fromUtf8("gridLayout")) - self.label_2 = QtGui.QLabel(Dialog) - self.label_2.setObjectName(_fromUtf8("label_2")) - self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1) - self.mesh = QtGui.QLineEdit(Dialog) - self.mesh.setReadOnly(True) - self.mesh.setObjectName(_fromUtf8("mesh")) - self.gridLayout.addWidget(self.mesh, 0, 1, 1, 2) - self.label_3 = QtGui.QLabel(Dialog) - self.label_3.setObjectName(_fromUtf8("label_3")) - self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1) - self.control = QtGui.QComboBox(Dialog) - self.control.setObjectName(_fromUtf8("control")) - self.gridLayout.addWidget(self.control, 1, 1, 1, 2) - self.label = QtGui.QLabel(Dialog) - self.label.setObjectName(_fromUtf8("label")) - self.gridLayout.addWidget(self.label, 2, 0, 1, 1) - self.minvalue = QtGui.QLineEdit(Dialog) - self.minvalue.setReadOnly(True) - self.minvalue.setObjectName(_fromUtf8("minvalue")) - self.gridLayout.addWidget(self.minvalue, 2, 1, 1, 2) - self.label_4 = QtGui.QLabel(Dialog) - self.label_4.setObjectName(_fromUtf8("label_4")) - self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1) - self.maxvalue = QtGui.QLineEdit(Dialog) - self.maxvalue.setReadOnly(True) - self.maxvalue.setObjectName(_fromUtf8("maxvalue")) - self.gridLayout.addWidget(self.maxvalue, 3, 1, 1, 2) - self.buttonBox = QtGui.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Help) - self.buttonBox.setObjectName(_fromUtf8("buttonBox")) - self.gridLayout.addWidget(self.buttonBox, 4, 0, 1, 3) - - self.retranslateUi(Dialog) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.OnCancel) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("helpRequested()")), Dialog.helpMessage) - QtCore.QObject.connect(self.control, QtCore.SIGNAL(_fromUtf8("activated(QString)")), Dialog.compute_minmax) - QtCore.QMetaObject.connectSlotsByName(Dialog) - Dialog.setTabOrder(self.mesh, self.control) - Dialog.setTabOrder(self.control, self.minvalue) - Dialog.setTabOrder(self.minvalue, self.maxvalue) - Dialog.setTabOrder(self.maxvalue, self.buttonBox) - - def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Get min and max value of control", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate("Dialog", "Mesh", None, QtGui.QApplication.UnicodeUTF8)) - self.label_3.setText(QtGui.QApplication.translate("Dialog", "Control", None, QtGui.QApplication.UnicodeUTF8)) - self.label.setText(QtGui.QApplication.translate("Dialog", "Min", None, QtGui.QApplication.UnicodeUTF8)) - self.label_4.setText(QtGui.QApplication.translate("Dialog", "Max", None, QtGui.QApplication.UnicodeUTF8)) - diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index aa050e373..27e56ff20 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -108,13 +108,15 @@ void MessageOutput( QtMsgType type, const QMessageLogContext &context, const QSt switch ( type ) { case QtDebugMsg: - //MESSAGE( "Debug: " << qPrintable(msg) ); +#ifdef QT_DEBUG_MESSAGE + MESSAGE( "Debug: " << qPrintable( QString(msg) ) ); +#endif break; case QtWarningMsg: - MESSAGE( "Warning: " << qPrintable(msg) ); + MESSAGE( "Warning: " << qPrintable( QString(msg) ) ); break; case QtFatalMsg: - MESSAGE( "Fatal: " << qPrintable(msg) ); + MESSAGE( "Fatal: " << qPrintable( QString(msg) ) ); break; } } diff --git a/src/TreeData/Test/mainwindow.cxx b/src/TreeData/Test/mainwindow.cxx index 51dab073e..0e07e7b95 100644 --- a/src/TreeData/Test/mainwindow.cxx +++ b/src/TreeData/Test/mainwindow.cxx @@ -17,8 +17,8 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include #include +#include #include "mainwindow.hxx" #include "TreeModel.hxx" diff --git a/src/TreeData/TreeModel.cxx b/src/TreeData/TreeModel.cxx index 073aa8279..5bb540c91 100644 --- a/src/TreeData/TreeModel.cxx +++ b/src/TreeData/TreeModel.cxx @@ -20,8 +20,6 @@ // Author: Guillaume Boulant (EDF/R&D) -#include - #include "TreeItem.hxx" #include "TreeModel.hxx" diff --git a/src/VTKViewer/VTKViewer_Filter.cxx b/src/VTKViewer/VTKViewer_Filter.cxx index 73abaf948..3543de328 100755 --- a/src/VTKViewer/VTKViewer_Filter.cxx +++ b/src/VTKViewer/VTKViewer_Filter.cxx @@ -50,7 +50,7 @@ VTKViewer_Filter::~VTKViewer_Filter() * call virtual method IsValid( const int theId ). * \param theActor - actor * \param theCellId - cell id. - * \retval TRUE - if cell id is valid, else false. + * \retval \c true - if cell id is valid, else \c false. */ bool VTKViewer_Filter::IsValid( VTKViewer_Actor* theActor, const int theCellId ) { diff --git a/src/VTKViewer/VTKViewer_InteractorStyle.cxx b/src/VTKViewer/VTKViewer_InteractorStyle.cxx index 93b1da183..61762c5f7 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyle.cxx +++ b/src/VTKViewer/VTKViewer_InteractorStyle.cxx @@ -674,7 +674,7 @@ void VTKViewer_InteractorStyle::startGlobalPan() } -/*!\retval TRUE if needs redrawing*/ +/*!\retval \c true if needs redrawing*/ bool VTKViewer_InteractorStyle::needsRedrawing() { return State == VTK_INTERACTOR_STYLE_CAMERA_ZOOM || @@ -1482,7 +1482,7 @@ void VTKViewer_InteractorStyle::RemoveFilter( const int theId ) /*!Checks: is valid cell(node) with id \a theId in actor \a theActor. *\param theActor - VTKViewer_Actor pointer. *\param theId - cell id. - *\param theIsNode - boolean flag, if true - node, else - cell. + *\param theIsNode - boolean flag, if \c true - node, else - cell. */ bool VTKViewer_InteractorStyle::IsValid( VTKViewer_Actor* theActor, const int theId, diff --git a/tools/dlgfactory/GenericDialog.cxx b/tools/dlgfactory/GenericDialog.cxx index d0e935b06..67b9e7cb0 100644 --- a/tools/dlgfactory/GenericDialog.cxx +++ b/tools/dlgfactory/GenericDialog.cxx @@ -18,8 +18,9 @@ // #include "GenericDialog.h" +#include -GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent) +GenericDialog::GenericDialog(QDialog* parent) : QDialog(parent) { ui.setupUi(this); // A faire en premier @@ -32,16 +33,14 @@ GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent) // buttonbox (inherited features) } -QFrame * GenericDialog::getPanel() { +QFrame* GenericDialog::getPanel() { return ui.centralPanel; } -QDialogButtonBox * GenericDialog::getButtonBox() { +QDialogButtonBox* GenericDialog::getButtonBox() { return ui.buttonBox; } - -#include void GenericDialog::accept() { qDebug() << "accept() is not implemented yet"; QDialog::accept(); diff --git a/tools/dlgfactory/GenericDialog.h b/tools/dlgfactory/GenericDialog.h index ab4f62242..3e99e142c 100644 --- a/tools/dlgfactory/GenericDialog.h +++ b/tools/dlgfactory/GenericDialog.h @@ -20,25 +20,28 @@ #ifndef _GenericDialog_HXX #define _GenericDialog_HXX -#include +#include + #include "ui_GenericDialog.h" +class QFrame; +class QDialogButtonBox; + class GenericDialog : public QDialog { Q_OBJECT - + public: - GenericDialog(QDialog *parent = 0); + GenericDialog(QDialog* parent = 0); - protected: - QFrame * getPanel(); +protected: + QFrame* getPanel(); QDialogButtonBox * getButtonBox(); - - protected slots: - void accept(); - //void reject(); - - private: + +protected slots: + void accept(); + +private: Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h }; diff --git a/tools/dlgfactory/__GDIALOG__.cxx b/tools/dlgfactory/__GDIALOG__.cxx index 14dc63ac0..9093dbb26 100644 --- a/tools/dlgfactory/__GDIALOG__.cxx +++ b/tools/dlgfactory/__GDIALOG__.cxx @@ -1,6 +1,6 @@ #include "__CLASSNAME__.h" -__CLASSNAME__::__CLASSNAME__(QDialog *parent) : GenericDialog(parent) +__CLASSNAME__::__CLASSNAME__(QDialog* parent) : GenericDialog(parent) { ui.setupUi(this->getPanel()); } diff --git a/tools/dlgfactory/__GDIALOG__.h b/tools/dlgfactory/__GDIALOG__.h index 03132d9ec..a37ddb4bc 100644 --- a/tools/dlgfactory/__GDIALOG__.h +++ b/tools/dlgfactory/__GDIALOG__.h @@ -1,18 +1,17 @@ #ifndef ___CLASSNAME___HXX #define ___CLASSNAME___HXX -#include #include "ui___CLASSNAME__.h" #include "GenericDialog.h" class __CLASSNAME__ : public GenericDialog { Q_OBJECT - - public: - __CLASSNAME__(QDialog *parent = 0); - - private: + +public: + __CLASSNAME__(QDialog* parent = 0); + +private: Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx }; diff --git a/tools/dlgfactory/__QDIALOG__.cxx b/tools/dlgfactory/__QDIALOG__.cxx index 97f1fadd4..df9145685 100644 --- a/tools/dlgfactory/__QDIALOG__.cxx +++ b/tools/dlgfactory/__QDIALOG__.cxx @@ -1,6 +1,7 @@ #include "__CLASSNAME__.h" +#include -__CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent) +__CLASSNAME__::__CLASSNAME__(QDialog* parent) : QDialog(parent) { ui.setupUi(this); // A faire en premier @@ -13,7 +14,6 @@ __CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent) // buttonbox (inherited features) } -#include void __CLASSNAME__::accept() { qDebug() << "accept() is not implemented yet"; QDialog::accept(); diff --git a/tools/dlgfactory/__QDIALOG__.h b/tools/dlgfactory/__QDIALOG__.h index b2cfd4f7f..37ca44375 100644 --- a/tools/dlgfactory/__QDIALOG__.h +++ b/tools/dlgfactory/__QDIALOG__.h @@ -1,21 +1,21 @@ #ifndef ___CLASSNAME___HXX #define ___CLASSNAME___HXX -#include +#include + #include "ui___CLASSNAME__.h" class __CLASSNAME__ : public QDialog { Q_OBJECT - - public: - __CLASSNAME__(QDialog *parent = 0); - - protected slots: - void accept(); - //void reject(); - - private: + +public: + __CLASSNAME__(QDialog* parent = 0); + +protected slots: + void accept(); + +private: Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx }; diff --git a/tools/dlgfactory/gtester.cxx b/tools/dlgfactory/gtester.cxx index fbc5baa5b..6c650a58b 100644 --- a/tools/dlgfactory/gtester.cxx +++ b/tools/dlgfactory/gtester.cxx @@ -23,15 +23,14 @@ // (gboulant - 12/10/2010) // #include -#include #include "GDialogTest.h" void TEST_show() { - GDialogTest * dialog = new GDialogTest(); + GDialogTest* dialog = new GDialogTest(); dialog->show(); } -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { QApplication app(argc, argv); TEST_show(); diff --git a/tools/dlgfactory/qtester.cxx b/tools/dlgfactory/qtester.cxx index 67a875f1a..fd4df0a0f 100644 --- a/tools/dlgfactory/qtester.cxx +++ b/tools/dlgfactory/qtester.cxx @@ -23,15 +23,14 @@ // (gboulant - 12/10/2010) // #include -#include #include "QDialogTest.h" void TEST_show() { - QDialogTest * dialog = new QDialogTest(); + QDialogTest* dialog = new QDialogTest(); dialog->show(); } -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { QApplication app(argc, argv); TEST_show(); -- 2.39.2