ENDFOREACH(D ${QT_INCLUDES})
SET(QT_INCLUDES ${DIRS}) # to be removed
SET(QT_INCLUDES ${QT_INCLUDES} -DQT_THREAD_SUPPORT) # to be removed
-SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT)
+SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT -DQT_NO_KEYWORDS)
SET(QT_MT_LIBS ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY})
SET(QT_LIBS ${QT_MT_LIBS})
SET(qt4_ldflags ${QT_MT_LIBS})
virtual QString getFileFilter() const;
-public slots:
+public Q_SLOTS:
virtual void onHelpAbout();
-protected slots:
+protected Q_SLOTS:
virtual bool onUndo( int );
virtual bool onRedo( int );
QStringList somewhereLoaded;
QList<SUIT_Application*> apps = SUIT_Session::session()->applications();
- foreach( SUIT_Application* app, apps ) {
+ Q_FOREACH( SUIT_Application* app, apps ) {
CAM_Application* camApp = dynamic_cast<CAM_Application*>( app );
if ( !camApp ) continue;
QStringList loaded;
camApp->modules( loaded, true );
- foreach( QString lm, loaded ) {
+ Q_FOREACH( QString lm, loaded ) {
if ( !somewhereLoaded.contains( lm ) ) somewhereLoaded << lm;
}
}
myRoot->connect( SIGNAL( destroyed( SUIT_DataObject* ) ),
this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
- emit rootChanged( this );
+ Q_EMIT rootChanged( this );
}
/*!
protected:
virtual void setRoot( const CAM_DataObject* );
-private slots:
+private Q_SLOTS:
void onDestroyed( SUIT_DataObject* );
-signals:
+Q_SIGNALS:
void rootChanged( const CAM_DataModel* );
private:
static QAction* separator();
-public slots:
+public Q_SLOTS:
virtual bool activateModule( SUIT_Study* );
virtual bool deactivateModule( SUIT_Study* );
virtual void onApplicationClosed( SUIT_Application* );
-private slots:
+private Q_SLOTS:
void onInfoChanged( QString );
protected:
virtual bool openDataModel( const QString&, CAM_DataModel* );
virtual bool saveDataModel( const QString&, CAM_DataModel* );
-protected slots:
+protected Q_SLOTS:
virtual void updateModelRoot( const CAM_DataModel* );
private:
static int appendKey() { return apppendKey; }
static void setAppendKey( int k ) { apppendKey = k; }
-signals:
+Q_SIGNALS:
void selSelectionCancel();
void selSelectionDone( bool append, SelectionChangeStatus status );
// bool lcOpen = ( myAISContext->IndexOfCurrentLocal() != -1 );
// lcOpen ? myAISContext->ClearSelected( updateViewer ) :
// myAISContext->ClearCurrent( updateViewer );
- if ( hadSelection ) emit selSelectionCancel();
+ if ( hadSelection ) Q_EMIT selSelectionCancel();
}
/*!
{
int selAfter = numSelected();
if ( selBefore > 0 && selAfter < 1 )
- emit selSelectionCancel();
+ Q_EMIT selSelectionCancel();
else if ( selAfter > 0 )
{
switch( aStatus )
{
case SS_LocalChanged:
- emit selSelectionDone( selAfter > 1, SCS_Local );
+ Q_EMIT selSelectionDone( selAfter > 1, SCS_Local );
break;
case SS_GlobalChanged:
- emit selSelectionDone( selAfter > 1, SCS_Global );
+ Q_EMIT selSelectionDone( selAfter > 1, SCS_Global );
break;
}
}
void hideTipAndSleep();
void wakeup( int mseconds = TIP_TIME );
-private slots:
+private Q_SLOTS:
void showTip();
private:
switch ( e->type() )
{
case QEvent::MouseButtonPress:
- emit mousePressed( this, e );
+ Q_EMIT mousePressed( this, e );
break;
case QEvent::MouseButtonRelease:
- emit mouseReleased( this, e );
+ Q_EMIT mouseReleased( this, e );
break;
case QEvent::MouseButtonDblClick:
- emit mouseDoubleClicked( this, e );
+ Q_EMIT mouseDoubleClicked( this, e );
break;
case QEvent::MouseMove:
- emit mouseMoving( this, e );
+ Q_EMIT mouseMoving( this, e );
break;
default:
break;
switch ( e->type() )
{
case QEvent::KeyPress:
- emit keyPressed( this, e );
+ Q_EMIT keyPressed( this, e );
break;
case QEvent::KeyRelease:
- emit keyReleased( this, e );
+ Q_EMIT keyReleased( this, e );
break;
default:
break;
switch ( e->type() )
{
case QEvent::Wheel:
- emit wheeling( this, e );
+ Q_EMIT wheeling( this, e );
break;
default:
break;
virtual QImage dumpView();
-signals:
+Q_SIGNALS:
void vfDrawExternal( QPainter* );
void vfViewClosing( QCloseEvent* );
//ViewType getTypeView() const { return VIEW_GL; };
QWidget* getViewWidget() { return ( QWidget* )getViewPort(); };
-protected slots:
+protected Q_SLOTS:
void onViewPan();
void onViewZoom();
void onViewFitAll();
void onViewTop() {};
void onViewTrihedron() {};
-private slots:
+private Q_SLOTS:
void keyEvent( QKeyEvent* );
void mouseEvent( QMouseEvent* );
void wheelEvent( QWheelEvent* );
*/
void GLViewer_ViewPort::mousePressEvent( QMouseEvent *e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void GLViewer_ViewPort::mouseMoveEvent( QMouseEvent* e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void GLViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
/* show popup menu */
if ( e->button() == Qt::RightButton )
*/
void GLViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void GLViewer_ViewPort::keyPressEvent( QKeyEvent *e )
{
- emit vpKeyEvent( e );
+ Q_EMIT vpKeyEvent( e );
}
/*!
*/
void GLViewer_ViewPort::keyReleaseEvent( QKeyEvent *e )
{
- emit vpKeyEvent( e );
+ Q_EMIT vpKeyEvent( e );
}
/*!
*/
void GLViewer_ViewPort::wheelEvent( QWheelEvent *e )
{
- emit vpWheelEvent( e );
+ Q_EMIT vpWheelEvent( e );
}
/*!
if ( myPaintersRedrawing )
{
QPainter p( this );
- emit vpDrawExternal( &p );
+ Q_EMIT vpDrawExternal( &p );
myPaintersRedrawing = false;
}
}
void GLViewer_ViewPort::contextMenuEvent( QContextMenuEvent* e )
{
//if ( e->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( e );
+ Q_EMIT contextMenuRequested( e );
}
virtual void fitSelect() = 0;
virtual void fitAll( bool keepScale = false, bool withZ = true ) = 0;
-protected slots:
+protected Q_SLOTS:
virtual void onChangeBgColor();
-signals:
+Q_SIGNALS:
void vpKeyEvent( QKeyEvent* );
void vpMouseEvent( QMouseEvent* );
void vpWheelEvent( QWheelEvent* );
*/
void GLViewer_ViewPort2d::mousePressEvent( QMouseEvent* e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer();
GLViewer_Context* aContext = aViewer->getGLContext();
*/
void GLViewer_ViewPort2d::mouseMoveEvent( QMouseEvent* e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
if( myIsDragProcess == inDrag )
onDragObject( e );
// popup->exec( QCursor::pos() );
//destroyPopup( /*popup*/ );
}
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
if( myIsDragProcess == inDrag )
{
if( isAnyMoved )
{
- emit objectMoved();
+ Q_EMIT objectMoved();
aViewer->updateBorders();
}
}
myGLWidget->updateGL();
if( keepScale )
- emit vpUpdateValues();
+ Q_EMIT vpUpdateValues();
}
/*!
//! Transforms global rect to window rect
QRect GLV2win( const GLViewer_Rect& ) const;
-signals:
+Q_SIGNALS:
//! Emits after any transformation
void vpUpdateValues();
//! Transform view by view borders ( if \param keepScale = true, zoom does not change )
virtual void fitAll( bool keepScale = false, bool withZ = true );
-protected slots:
+protected Q_SLOTS:
//! Initializes drag process
void onStartDragObject();
//! Pastes object from clipboard
*/
void GLViewer_Viewer::onSelectionDone( bool bAdded, SelectionChangeStatus status )
{
- emit selectionChanged( status );
+ Q_EMIT selectionChanged( status );
}
/*!
*/
void GLViewer_Viewer::onSelectionCancel()
{
- emit selectionChanged( SCS_Invalid );
+ Q_EMIT selectionChanged( SCS_Invalid );
}
/*!
GLViewer_ViewFrame* getActiveView() const;
-signals:
+Q_SIGNALS:
void selectionChanged( SelectionChangeStatus );
protected:
virtual void finishOperations( QMouseEvent* ) {}
virtual void startOperations( QWheelEvent* ) {}
-protected slots:
+protected Q_SLOTS:
virtual void onKeyEvent( SUIT_ViewWindow*, QKeyEvent* );
virtual void onMouseEvent( SUIT_ViewWindow*, QMouseEvent* );
virtual void onWheelEvent( SUIT_ViewWindow*, QWheelEvent* );
update = anObject->updateZoom( zoomIn ) || update;
}
- emit wheelZoomChange( zoomIn );
+ Q_EMIT wheelZoomChange( zoomIn );
if( update )
updateAll();
//! Repaints view \param theView. If \param theView = NULL repaints all views.
void repaintView( GLViewer_ViewFrame* theView = NULL, bool makeCurrent = false );
-signals:
+Q_SIGNALS:
//! Signal needs for optimum recompute of zoom depending objects
//! Warning: use recompute without update viewer
void wheelZoomChange( bool );
-public slots:
+public Q_SLOTS:
//void onSketchDelObject();
//void onSketchUndoLast();
//void onSketchFinish();
//! Starts any operations on mouse wheel event
virtual void startOperations( QWheelEvent* );
-protected slots:
+protected Q_SLOTS:
void onMouseEvent( SUIT_ViewWindow*, QMouseEvent* );
private:
//================================================================
void GraphicsView_Scene::processRectChanged()
{
- emit gsBoundingRectChanged();
+ Q_EMIT gsBoundingRectChanged();
}
//================================================================
//================================================================
void GraphicsView_Scene::keyPressEvent( QKeyEvent* e )
{
- emit gsKeyEvent( e );
+ Q_EMIT gsKeyEvent( e );
QGraphicsScene::keyPressEvent( e );
}
//================================================================
void GraphicsView_Scene::keyReleaseEvent( QKeyEvent* e )
{
- emit gsKeyEvent( e );
+ Q_EMIT gsKeyEvent( e );
QGraphicsScene::keyReleaseEvent( e );
}
//================================================================
void GraphicsView_Scene::mousePressEvent( QGraphicsSceneMouseEvent* e )
{
- emit gsMouseEvent( e );
+ Q_EMIT gsMouseEvent( e );
QGraphicsScene::mousePressEvent( e );
}
//================================================================
void GraphicsView_Scene::mouseMoveEvent( QGraphicsSceneMouseEvent* e )
{
- emit gsMouseEvent( e );
+ Q_EMIT gsMouseEvent( e );
QGraphicsScene::mouseMoveEvent( e );
}
//================================================================
void GraphicsView_Scene::mouseReleaseEvent( QGraphicsSceneMouseEvent* e )
{
- emit gsMouseEvent( e );
+ Q_EMIT gsMouseEvent( e );
QGraphicsScene::mouseReleaseEvent( e );
}
//================================================================
void GraphicsView_Scene::mouseDoubleClickEvent( QGraphicsSceneMouseEvent* e )
{
- emit gsMouseEvent( e );
+ Q_EMIT gsMouseEvent( e );
QGraphicsScene::mouseDoubleClickEvent( e );
}
//================================================================
void GraphicsView_Scene::wheelEvent( QGraphicsSceneWheelEvent* e )
{
- emit gsWheelEvent( e );
+ Q_EMIT gsWheelEvent( e );
// accept the event to prevent calling QAbstractScrollArea::wheelEvent()
// from QGraphicsView::wheelEvent(), which will change values of scroll-bars
//================================================================
void GraphicsView_Scene::contextMenuEvent( QGraphicsSceneContextMenuEvent* e )
{
- emit gsContextMenuEvent( e );
+ Q_EMIT gsContextMenuEvent( e );
QGraphicsScene::contextMenuEvent( e );
}
public:
void processRectChanged();
-protected slots:
+protected Q_SLOTS:
void onSceneRectChanged( const QRectF& theRect ); // for debug
protected:
virtual void dragMoveEvent( QGraphicsSceneDragDropEvent* );
virtual void dropEvent( QGraphicsSceneDragDropEvent* );
-signals:
+Q_SIGNALS:
void gsKeyEvent( QKeyEvent* );
void gsMouseEvent( QGraphicsSceneMouseEvent* );
void gsWheelEvent( QGraphicsSceneWheelEvent* );
return;
if ( numSelected() > 0 )
- emit selSelectionCancel();
+ Q_EMIT selSelectionCancel();
}
//================================================================
{
int selAfter = numSelected();
if ( selBefore > 0 && selAfter < 1 )
- emit selSelectionCancel();
+ Q_EMIT selSelectionCancel();
else if ( selAfter > 0 )
{
switch( theStatus )
{
case GVSS_LocalChanged:
- emit selSelectionDone( GVSCS_Local );
+ Q_EMIT selSelectionDone( GVSCS_Local );
break;
case GVSS_GlobalChanged:
- emit selSelectionDone( GVSCS_Global );
+ Q_EMIT selSelectionDone( GVSCS_Global );
break;
}
}
virtual void checkSelection( int, bool, int );
-signals:
+Q_SIGNALS:
void selSelectionDone( GV_SelectionChangeStatus );
void selSelectionCancel();
switch ( e->type() )
{
case QEvent::KeyPress:
- emit keyPressed( e );
+ Q_EMIT keyPressed( e );
break;
case QEvent::KeyRelease:
- emit keyReleased( e );
+ Q_EMIT keyReleased( e );
break;
default:
break;
switch ( e->type() )
{
case QEvent::GraphicsSceneMousePress:
- emit mousePressed( e );
+ Q_EMIT mousePressed( e );
break;
case QEvent::GraphicsSceneMouseMove:
- emit mouseMoving( e );
+ Q_EMIT mouseMoving( e );
break;
case QEvent::GraphicsSceneMouseRelease:
- emit mouseReleased( e );
+ Q_EMIT mouseReleased( e );
break;
case QEvent::GraphicsSceneMouseDoubleClick:
- emit mouseDoubleClicked( e );
+ Q_EMIT mouseDoubleClicked( e );
break;
default:
break;
switch ( e->type() )
{
case QEvent::GraphicsSceneWheel:
- emit wheeling( e );
+ Q_EMIT wheeling( e );
break;
default:
break;
QPoint aPos = myViewPort->mapFromScene( e->scenePos() );
QContextMenuEvent* anEvent = new QContextMenuEvent( (QContextMenuEvent::Reason)e->reason(),
aPos, e->screenPos(), e->modifiers() );
- emit contextMenuRequested( anEvent );
+ Q_EMIT contextMenuRequested( anEvent );
delete anEvent;
}
void expandToolBarActions();
int getToolBarId();
-protected slots:
+protected Q_SLOTS:
void onViewPan();
void onViewZoom();
void onViewFitAll();
void onViewGlobalPan();
void onViewReset();
-private slots:
+private Q_SLOTS:
void keyEvent( QKeyEvent* );
void mouseEvent( QGraphicsSceneMouseEvent* );
void wheelEvent( QGraphicsSceneWheelEvent* );
void contextMenuEvent( QGraphicsSceneContextMenuEvent* );
-signals:
+Q_SIGNALS:
void keyPressed( QKeyEvent* );
void keyReleased( QKeyEvent* );
void mousePressed( QGraphicsSceneMouseEvent* );
if( theStatus )
{
QPainterPath aPath = mySketchingItem->path();
- emit vpSketchingFinished( aPath );
+ Q_EMIT vpSketchingFinished( aPath );
}
}
//================================================================
void GraphicsView_ViewPort::onKeyEvent( QKeyEvent* e )
{
- emit vpKeyEvent( e );
+ Q_EMIT vpKeyEvent( e );
}
//================================================================
//================================================================
void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
bool anIsHandled = false;
switch( e->type() )
if( !anIsHandled && !isPulling() && myIsDragging )
{
- emit vpObjectBeforeMoving();
+ Q_EMIT vpObjectBeforeMoving();
bool anIsMoved = false;
for( initSelected(); moreSelected(); nextSelected() )
myDragPosition = QPointF();
setCursor( myStoredCursor );
- emit vpObjectAfterMoving( anIsMoved );
+ Q_EMIT vpObjectAfterMoving( anIsMoved );
}
break;
}
//================================================================
void GraphicsView_ViewPort::onWheelEvent( QGraphicsSceneWheelEvent* e )
{
- emit vpWheelEvent( e );
+ Q_EMIT vpWheelEvent( e );
}
//================================================================
//================================================================
void GraphicsView_ViewPort::onContextMenuEvent( QGraphicsSceneContextMenuEvent* e )
{
- emit vpContextMenuEvent( e );
+ Q_EMIT vpContextMenuEvent( e );
}
//================================================================
static QCursor* getZoomCursor() { return zoomCursor; }
static QCursor* getSketchCursor() { return sketchCursor; }
-public slots:
+public Q_SLOTS:
void onBoundingRectChanged();
-protected slots:
+protected Q_SLOTS:
void onKeyEvent( QKeyEvent* );
void onMouseEvent( QGraphicsSceneMouseEvent* );
void onWheelEvent( QGraphicsSceneWheelEvent* );
protected:
virtual void scrollContentsBy( int theDX, int theDY );
-signals:
+Q_SIGNALS:
void vpKeyEvent( QKeyEvent* );
void vpMouseEvent( QGraphicsSceneMouseEvent* );
void vpWheelEvent( QGraphicsSceneWheelEvent* );
if( anIsScaleChanged )
{
- emit wheelScaleChanged();
+ Q_EMIT wheelScaleChanged();
aViewPort->onBoundingRectChanged();
}
}
//================================================================
void GraphicsView_Viewer::onSelectionDone( GV_SelectionChangeStatus theStatus )
{
- emit selectionChanged( theStatus );
+ Q_EMIT selectionChanged( theStatus );
}
//================================================================
//================================================================
void GraphicsView_Viewer::onSelectionCancel()
{
- emit selectionChanged( GVSCS_Invalid );
+ Q_EMIT selectionChanged( GVSCS_Invalid );
}
/*
bool isInitialized() const { return myIsInitialized; }
void setIsInitialized( bool );
-signals:
+Q_SIGNALS:
void selectionChanged( GV_SelectionChangeStatus );
void wheelScaleChanged();
virtual void onTransformationStarted();
virtual void onTransformationFinished();
-protected slots:
+protected Q_SLOTS:
virtual void onKeyEvent( QKeyEvent* );
virtual void onMouseEvent( QGraphicsSceneMouseEvent* );
virtual void onWheelEvent( QGraphicsSceneWheelEvent* );
QString engineIOR() const;
virtual void windows( QMap<int, int>& theMap ) const;
-public slots:
+public Q_SLOTS:
bool deactivateModule( SUIT_Study* );
bool activateModule( SUIT_Study* );
// This part defines slots for test purposes
// =========================================================
-protected slots:
+protected Q_SLOTS:
void OnTest();
};
socket->waitForBytesWritten(1000);
socket->waitForDisconnected(1000); // make sure client reads ack
delete socket;
- emit messageReceived(message); //### (might take a long time to return)
+ Q_EMIT messageReceived(message); //### (might take a long time to return)
}
int id = LightApp_Application::UserID + FIRST_HELP_ID;
QString aModule;
- foreach( aModule, aModuleList ) {
+ Q_FOREACH( aModule, aModuleList ) {
if ( aModule.isEmpty() ) // module title (user name)
continue;
IMap <QString, QString> helpData; // list of help files for the module
if ( !docSection.isEmpty() ) {
helpSubMenu = resMgr->stringValue( docSection, "sub_menu", "" ).arg( aModule );
QStringList listOfParam = resMgr->parameters( docSection );
- foreach( QString paramName, listOfParam ) {
+ Q_FOREACH( QString paramName, listOfParam ) {
QString valueStr = resMgr->stringValue( docSection, paramName );
if ( !valueStr.isEmpty() ) {
QFileInfo fi( valueStr );
}
// create sub-menus hierarchy
int menuId = helpMenu;
- foreach ( QString subMenu, smenus ) {
+ Q_FOREACH ( QString subMenu, smenus ) {
menuId = createMenu( subMenu, menuId, -1, 0 );
}
createMenu( a, menuId, -1, 0 );
createMenu( separator(), helpMenu, -1, 5 );
QStringList addHelpItems = resMgr->parameters( "add_help" );
- foreach ( QString addHelpItem, addHelpItems ) {
+ Q_FOREACH ( QString addHelpItem, addHelpItems ) {
QString valueStr = resMgr->stringValue( "add_help", addHelpItem );
if ( !valueStr.isEmpty() && QFile::exists( valueStr ) ) {
QAction* a = createAction( id, addHelpItem,
if ( objectBrowser() )
objectBrowser()->openLevels();
- emit studyOpened();
+ Q_EMIT studyOpened();
}
/*!Protected SLOT. On study saved.*/
if ( mru && s )
mru->insert( s->studyName() );
- emit studySaved();
+ Q_EMIT studySaved();
}
/*!Protected SLOT. On study closed.*/
mySelMgr->clearSelected();
// Bug 12944: emit signal only after clear selection
- emit studyClosed();
+ Q_EMIT studyClosed();
activateModule( "" );
}
else
preferencesChanged( section, param );
// emit signal to allow additional preferences changing processing
- emit preferenceChanged( modName, section, param );
+ Q_EMIT preferenceChanged( modName, section, param );
}
/*!Remove all windows from study.*/
LightApp_Preferences::Selector, "language", "language" );
QStringList aLangs = SUIT_Session::session()->resourceMgr()->stringValue( "language", "languages", "en" ).split( "," );
QList<QVariant> aIcons;
- foreach ( QString aLang, aLangs ) {
+ Q_FOREACH ( QString aLang, aLangs ) {
aIcons << QPixmap( QString( ":/images/%1" ).arg( aLang ) );
}
pref->setItemProperty( "strings", aLangs, curLang );
anIndicesList.clear();
txtList.clear();
formats = OCCViewer_Viewer::backgroundData( aValuesList, idList, txtList );
- foreach( int gid, idList ) anIndicesList << gid;
+ Q_FOREACH( int gid, idList ) anIndicesList << gid;
// .... -> 3D viewer background
bgId = pref->addPreference( tr( "PREF_3DVIEWER_BACKGROUND" ), bgGroup,
LightApp_Preferences::Background, "OCCViewer", "background" );
#ifndef DISABLE_SALOMEOBJECT
formats = SVTK_Viewer::backgroundData( aValuesList, idList, txtList );
#endif
- foreach( int gid, idList ) anIndicesList << gid;
+ Q_FOREACH( int gid, idList ) anIndicesList << gid;
bgId = pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGen,
LightApp_Preferences::Background, "VTKViewer", "background" );
pref->setItemProperty( "gradient_names", aValuesList, bgId );
if ( sec == "viewers" && param == "drop_down_buttons" )
{
ViewManagerList vmlist = viewManagers();
- foreach( SUIT_ViewManager* vm, vmlist )
+ Q_FOREACH( SUIT_ViewManager* vm, vmlist )
{
QVector<SUIT_ViewWindow*> vwlist = vm->getViews();
- foreach( SUIT_ViewWindow* vw, vwlist )
+ Q_FOREACH( SUIT_ViewWindow* vw, vwlist )
if ( vw ) vw->setDropDownButtons( resMgr->booleanValue( "viewers", "drop_down_buttons", true ) );
}
}
modName = activeModule()->moduleName();
if ( !isModuleAccessible( modName ) ) {
QList<SUIT_Application*> apps = SUIT_Session::session()->applications();
- foreach( SUIT_Application* app, apps ) {
+ Q_FOREACH( SUIT_Application* app, apps ) {
LightApp_Application* lapp = dynamic_cast<LightApp_Application*>( app );
if ( lapp && lapp != this )
lapp->removeModuleAction( modName );
QStringList mainToolbarsNames;
mainToolbarsNames << "SalomeStandard" << "SalomeModules";
QList<QToolBar*> mainToolbars = findToolBars( mainToolbarsNames );
- foreach( QToolBar* tb, mainToolbars ) tb->setVisible( true );
+ Q_FOREACH( QToolBar* tb, mainToolbars ) tb->setVisible( true );
/*
if ( !myWinVis.contains( modName ) && aDefaultVisibility.isEmpty())
return;
LightApp_SelectionMgr* selMgr = selectionMgr();
QList<SUIT_Selector*> selectors;
selMgr->selectors( selectors );
- foreach( SUIT_Selector* selector, selectors ) {
+ Q_FOREACH( SUIT_Selector* selector, selectors ) {
if ( selector->owner() == vm->getViewModel() ) {
delete selector;
}
QList<SUIT_ViewWindow*> wndList = desk->windows();
SUIT_ViewWindow* wnd;
- foreach( wnd, wndList )
+ Q_FOREACH( wnd, wndList )
{
if ( wnd )
wnd->close();
QStringList aTypesList = viewManagersTypes();
QList<SUIT_ViewManager*> aMgrList;
viewManagers( aMgrList );
- foreach (SUIT_ViewManager* aMgr, aMgrList) {
+ Q_FOREACH (SUIT_ViewManager* aMgr, aMgrList) {
if (aTypesList.contains(aMgr->getType()))
removeViewManager(aMgr);
}
const QString& theOperationName,
const QStringList& theEntryList )
{
- emit operationFinished( theModuleName, theOperationName, theEntryList );
+ Q_EMIT operationFinished( theModuleName, theOperationName, theEntryList );
}
/*!
virtual bool checkExistingDoc();
-signals:
+Q_SIGNALS:
void studyOpened();
void studySaved();
void studyClosed();
void preferenceChanged( const QString&, const QString&, const QString& );
void operationFinished( const QString&, const QString&, const QStringList& );
-public slots:
+public Q_SLOTS:
virtual void onHelpContentsModule();
virtual void onHelpContextModule( const QString&, const QString&, const QString& = QString() );
virtual void onNewDoc();
virtual QMap<int, QString> activateModuleActions() const;
virtual void moduleActionSelected( const int );
-protected slots:
+protected Q_SLOTS:
virtual void onDesktopActivated();
virtual void onViewManagerRemoved( SUIT_ViewManager* );
virtual void onWindowActivated( SUIT_ViewWindow* theViewWindow );
virtual void onDesktopMessage( const QString& );
-private slots:
+private Q_SLOTS:
void onSelection();
void onRefresh();
void onDropped( const QList<SUIT_DataObject*>&, SUIT_DataObject*, int, Qt::DropAction );
*/
bool LightApp_DataModel::open( const QString&, CAM_Study* study, QStringList )
{
- emit opened(); //TODO: is it really needed? to be removed maybe...
+ Q_EMIT opened(); //TODO: is it really needed? to be removed maybe...
return true;
}
*/
bool LightApp_DataModel::save( QStringList& )
{
- emit saved();
+ Q_EMIT saved();
return true;
}
*/
bool LightApp_DataModel::saveAs( const QString&, CAM_Study*, QStringList& )
{
- emit saved();
+ Q_EMIT saved();
return true;
}
*/
bool LightApp_DataModel::close()
{
- emit closed();
+ Q_EMIT closed();
return true;
}
void registerColumn( SUIT_DataBrowser*, const QString&, const int );
void unregisterColumn( SUIT_DataBrowser*, const QString& );
-signals:
+Q_SIGNALS:
void opened();
void saved();
void closed();
myObjects[ id ].myNames.clear();
myObjects[ id ].myEdit->setText( QString() );
- emit selectionChanged( id );
+ Q_EMIT selectionChanged( id );
}
}
if( on )
{
updateButtons( id );
- emit objectActivated( id );
+ Q_EMIT objectActivated( id );
}
else
- emit objectDeactivated( id );
+ Q_EMIT objectDeactivated( id );
}
}
filterTypes( id, obj.myNames, obj.myTypes, obj.myIds );
obj.myEdit->setText( selectionDescription( obj.myNames, obj.myTypes, obj.myNI ) );
if( emit_signal )
- emit selectionChanged( id );
+ Q_EMIT selectionChanged( id );
}
}
obj.myIds = ids;
obj.myNames = names;
- emit selectionChanged( id );
+ Q_EMIT selectionChanged( id );
}
/*!
if( id>=0 && !isReadOnly( id ) )
{
QStringList list = text.split( " ", QString::SkipEmptyParts );
- emit objectChanged( id, list );
+ Q_EMIT objectChanged( id, list );
}
}
//! Set all object selection buttons to inactive state
void deactivateAll();
-signals:
+Q_SIGNALS:
//! selection in certain widget is changed
void selectionChanged ( int );
//! Check the "read only" state of object selection line edit
bool isReadOnly( const int ) const;
-private slots:
+private Q_SLOTS:
//! emits if the object selection button changes state
void onToggled( bool );
QWidget* ob = app->objectBrowser();
QObject* obParent = ob ? ob->parent() : 0;
- foreach(QDockWidget* aWidget, aDocWidgets) {
+ Q_FOREACH(QDockWidget* aWidget, aDocWidgets) {
if(aWidget && aWidget->parent() == desktop) {
if( aWidget->isVisible() && aWidget != obParent ) {
aWidget->hide();
QList<QToolBar*> aToolBars = desktop->findChildren<QToolBar*>();
myToolBarMap.clear();
- foreach(QToolBar* aWidget, aToolBars ) {
+ Q_FOREACH(QToolBar* aWidget, aToolBars ) {
if( aWidget && aWidget->parent() == desktop ) {
if( aWidget->isVisible()) {
aWidget->hide();
virtual QString type() const { return GLViewer_Viewer2d::Type(); }
-private slots:
+private Q_SLOTS:
void onSelectionChanged();
protected:
virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
virtual void setSelection( const SUIT_DataOwnerPtrList& );
-protected slots:
+protected Q_SLOTS:
void onSelectionChanged( GV_SelectionChangeStatus );
protected:
virtual void updateModuleVisibilityState();
-public slots:
+public Q_SLOTS:
virtual bool activateModule( SUIT_Study* );
virtual bool deactivateModule( SUIT_Study* );
virtual void studyClosed( SUIT_Study* );
void MenuItem();
-protected slots:
+protected Q_SLOTS:
virtual void onModelSaved();
virtual void onModelOpened();
virtual void onModelClosed();
cb->blockSignals( blocked );
}
- emit moduleActivated( activeModule() );
+ Q_EMIT moduleActivated( activeModule() );
}
/*!
virtual bool event( QEvent* );
-signals:
+Q_SIGNALS:
void moduleActivated( const QString& );
private:
QAction* active() const;
void activate( int, bool = true );
-private slots:
+private Q_SLOTS:
void onChanged();
void onTriggered( int );
void onComboActivated( int );
QList<QtxComboBox*> widgets() const;
-signals:
+Q_SIGNALS:
void activatedId( int );
protected:
int addButton( const QString&, const int = -1);
-public slots:
+public Q_SLOTS:
void accept();
private:
static QString getName( QWidget* parent = 0, const QString& oldName = QString() );
-protected slots:
+protected Q_SLOTS:
void accept();
private:
unsigned long getModifiedTime() const;
void setModified();
-private slots:
+private Q_SLOTS:
void onSelectionChanged();
protected:
virtual QString type() const { return OCCViewer_Viewer::Type(); }
#endif
-private slots:
+private Q_SLOTS:
virtual void onSelectionChanged();
virtual void onDeselection();
void update( const int );
void setAutoResumed( const bool );
-private slots:
+private Q_SLOTS:
virtual void onSelectionDone();
/*!Return "ObjectBrowser"*/
virtual QString type() const { return "PLot2dViewer"; }
-private slots:
+private Q_SLOTS:
void onSelectionChanged( const QString& );
void onClearSelected();
QString sec, param;
it.key()->resource( sec, param );
QString mod = module( it.key()->id() );
- emit preferenceChanged( mod, sec, param );
+ Q_EMIT preferenceChanged( mod, sec, param );
}
}
protected:
void changedResources( const ResourceMap& );
-signals:
+Q_SIGNALS:
void preferenceChanged( QString&, QString&, QString& );
-private slots:
+private Q_SLOTS:
void onHelp();
void onApply();
bool isSaved() { return mySaved; }
void setSaved( bool saved ) { mySaved = saved; }
-private slots:
+private Q_SLOTS:
void onHelp();
void onApply();
void onDefault();
void LightApp_SelectionMgr::setSelectedObjects( const QStringList& lst, const bool append )
{
SUIT_DataOwnerPtrList owners;
- foreach( const QString& aValue, lst ) {
+ Q_FOREACH( const QString& aValue, lst ) {
if ( !aValue.isNull() )
owners.append( new LightApp_DataOwner( aValue ) );
}
myTimeStamp = QTime::currentTime();
- emit currentSelectionChanged();
+ Q_EMIT currentSelectionChanged();
}
#ifndef DISABLE_SALOMEOBJECT
bool append = false;
setSelected( remainsOwners, append );
- emit currentSelectionChanged();
+ Q_EMIT currentSelectionChanged();
// Bug 17269: To avoid calling of selected(aList)
//TColStd_IndexedMapOfInteger anIndexes;
bool isSelectionCacheEnabled() const;
void setSelectionCacheEnabled( bool );
-signals:
+Q_SIGNALS:
void currentSelectionChanged();
private:
bool aRet = CAM_Study::createDocument( theStr );
- emit created( this );
+ Q_EMIT created( this );
return aRet;
}
bool res = CAM_Study::openDocument( theFileName );
- emit opened( this );
+ Q_EMIT opened( this );
return res;
}
((LightApp_Application*)application())->updateObjectBrowser( false );
bool res = CAM_Study::openDocument( theStudyName );
- emit opened( this );
+ Q_EMIT opened( this );
//SRN: BugID IPAL9021: End
return res;
}
res = res && CAM_Study::saveDocumentAs( theFileName );
//SRN: BugID IPAL9377, removed usage of uninitialized variable <res>
if ( res )
- emit saved( this );
+ Q_EMIT saved( this );
return res;
}
bool res = saveStudyData(studyName());
res = res && CAM_Study::saveDocument();
if (res)
- emit saved( this );
+ Q_EMIT saved( this );
return res;
}
{
// Inform everybody that this study is going to close when it's most safe to,
// i.e. in the very beginning
- emit closed( this );
+ Q_EMIT closed( this );
CAM_Study::closeDocument(permanently);
virtual CAM_ModuleObject* createModuleObject( LightApp_DataModel* theDataModel,
SUIT_DataObject* theParent ) const;
-signals:
+Q_SIGNALS:
void saved ( SUIT_Study* );
void opened ( SUIT_Study* );
void closed ( SUIT_Study* );
LightApp_VTKSelector( SUIT_SelectionMgr* );
#endif
-private slots:
+private Q_SLOTS:
void onSelectionChanged();
#ifndef DISABLE_VTKVIEWER
void setMenuActions( const int );
int menuActions() const;
-protected slots:
+protected Q_SLOTS:
void onSaveToFile();
void onSelectAll();
void onClear();
myNumSelected = myAISContext->NbCurrents(); /* update after the last selection */
if ( status == AIS_SOP_NothingSelected && !hadSelection ) {
- emit selSelectionCancel( addTo );
+ Q_EMIT selSelectionCancel( addTo );
}
else if ( status == AIS_SOP_NothingSelected && hadSelection ) {
- emit selSelectionCancel( addTo ); /* unselected now */
+ Q_EMIT selSelectionCancel( addTo ); /* unselected now */
}
else if ( status == AIS_SOP_OneSelected || status == AIS_SOP_SeveralSelected )
{
- emit selSelectionDone( addTo ); /* selected ( the same object, may be ) */
+ Q_EMIT selSelectionDone( addTo ); /* selected ( the same object, may be ) */
}
return ( status != AIS_SOP_Error && status != AIS_SOP_NothingSelected );
}
// checks the status of pick and emits 'selSelectionDone' or 'selSelectionCancel'.
bool checkSelection ( AIS_StatusOfPick status, bool hadSelection, bool addTo );
-signals:
+Q_SIGNALS:
// 'selection done' signal
void selSelectionDone( bool bAdded );
// 'selection cancelled' signal
void Update();
-protected slots:
+protected Q_SLOTS:
bool apply();
void reset();
void accept();
if ( myIsClickable )
{
myViewer->getAISContext()->SetSelected( aPlane );
- emit planeClicked( aPlane );
+ Q_EMIT planeClicked( aPlane );
}
myIsDraggable = isDraggable( aPlane );
// performing dragging operation
performDragging( myDragPos, myPerformingOp, myInteractedPlane, aView3D );
- emit planeDragged( myInteractedPlane );
+ Q_EMIT planeDragged( myInteractedPlane );
return true;
}
void setMinMax( const Bnd_Box& );
virtual void setEnabled( const bool );
-signals:
+ Q_SIGNALS:
void planeClicked( const Handle_AIS_Plane& thePlane );
void planeDragged( const Handle_AIS_Plane& thePlane );
OCCViewer_ClipPlaneInteractor* myInteractor;
-public slots:
+public Q_SLOTS:
void onApply();
-private slots:
+private Q_SLOTS:
void ClickOnNew();
void ClickOnDelete();
*/
void OCCViewer_CreateRestoreViewDlg::OKpressed()
{
- emit dlgOk();
+ Q_EMIT dlgOk();
accept();
}
viewAspect currentItem() const;
virtual bool eventFilter( QObject*, QEvent* );
-public slots:
+public Q_SLOTS:
void OKpressed();
void clearList();
void editItemText( QListWidgetItem* );
void changeImage( QListWidgetItem* );
void deleteSelectedItems();
-signals:
+Q_SIGNALS:
void dlgOk();
private:
virtual void Update();
-private slots:
+private Q_SLOTS:
virtual bool onApply();
private:
void setEnabled(QGroupBox* theGrp, const bool theState);
-protected slots:
+protected Q_SLOTS:
void onBBCenterChecked();
void onToOrigin();
QString txt;
Handle( SelectMgr_EntityOwner ) owner = aCont->DetectedOwner();
if( !owner.IsNull() )
- emit toolTipFor( owner, txt );
+ Q_EMIT toolTipFor( owner, txt );
Handle_AIS_InteractiveObject obj = aCont->DetectedInteractive();
if( txt.isEmpty() && !obj.IsNull() )
- emit toolTipFor( obj, txt );
+ Q_EMIT toolTipFor( obj, txt );
if( txt.isEmpty() )
return;
QFont font() const;
void setFont( const QFont& );
-signals:
+Q_SIGNALS:
/*!
Called when owner is detected; allows to redefine tooltip text for owner
*/
*/
void toolTipFor( const Handle_AIS_InteractiveObject&, QString& );
-public slots:
+public Q_SLOTS:
void onToolTip( QPoint, QString&, QFont&, QRect&, QRect& );
private:
void OCCViewer_ViewFrame::setViewManager( SUIT_ViewManager* theMgr )
{
OCCViewer_ViewWindow::setViewManager(theMgr);
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->setViewManager(theMgr);
}
}
//**************************************************************************************
void OCCViewer_ViewFrame::updateEnabledDrawMode()
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH (OCCViewer_ViewWindow* aView, myViews) {
aView->updateEnabledDrawMode();
}
}
void OCCViewer_ViewFrame::setCuttingPlane( bool on, const double x , const double y , const double z,
const double dx, const double dy, const double dz)
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->setCuttingPlane(on, x, y, z, dx, dy, dz);
aView->update();
}
//**************************************************************************************
void OCCViewer_ViewFrame::setCuttingPlane( bool on, const gp_Pln thePln )
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->setCuttingPlane(on, thePln);
aView->update();
}
//**************************************************************************************
void OCCViewer_ViewFrame::setInteractionStyle( const int i )
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->setInteractionStyle(i);
}
}
//**************************************************************************************
void OCCViewer_ViewFrame::setZoomingStyle( const int i )
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH (OCCViewer_ViewWindow* aView, myViews) {
aView->setZoomingStyle(i);
}
}
if (myPopupRequestedView)
myPopupRequestedView->setBackgroundColor(theColor);
else {
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
if (aView->isVisible())
aView->setBackgroundColor(theColor);
}
if (myPopupRequestedView)
myPopupRequestedView->setBackground(theBackground);
else {
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
if (aView->isVisible())
aView->setBackground(theBackground);
}
void OCCViewer_ViewFrame::onViewFitAll()
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->onViewFitAll();
}
}
void OCCViewer_ViewFrame::onFitAll()
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->onFitAll();
}
}
if (myPopupRequestedView)
return myPopupRequestedView->backgroundColor();
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
if (aView->isVisible())
return aView->backgroundColor();
}
if (myPopupRequestedView)
return myPopupRequestedView->background();
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
if (aView->isVisible())
return aView->background();
}
if ( myPopupRequestedView )
myPopupRequestedView->showStaticTrihedron( on );
else {
- foreach ( OCCViewer_ViewWindow* aView, myViews ) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->showStaticTrihedron( on );
}
}
QImage OCCViewer_ViewFrame::dumpView()
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
if (aView->isVisible())
return aView->dumpView();
}
bool OCCViewer_ViewFrame::dumpViewToFormat( const QImage& image, const QString& fileName, const QString& format )
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
if (aView->isVisible())
return aView->dumpViewToFormat( image, fileName, format );
}
void OCCViewer_ViewFrame::setDropDownButtons( bool on )
{
- foreach( OCCViewer_ViewWindow* aView, myViews ) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->setDropDownButtons( on );
}
OCCViewer_ViewWindow::setDropDownButtons( on );
QStringList splitParams;
if( mySplitMode != -1 && myViewsMode.count() != 0 ) {
splitParams << QString::number( mySplitMode );
- foreach ( int aViewMode, myViewsMode )
+ Q_FOREACH( int aViewMode, myViewsMode )
splitParams << QString::number( aViewMode );
params.append( splitParams.join("*") );
}
void OCCViewer_ViewFrame::enableSelection( bool isEnabled )
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->enableSelection(isEnabled);
}
}
void OCCViewer_ViewFrame::enablePreselection( bool isEnabled )
{
- foreach (OCCViewer_ViewWindow* aView, myViews) {
+ Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) {
aView->enablePreselection(isEnabled);
}
}
virtual SUIT_CameraProperties cameraProperties();
-public slots:
+public Q_SLOTS:
virtual void onFrontView() { getView(MAIN_VIEW)->onFrontView(); }
virtual void onViewFitAll();
virtual void onBackView() { getView(MAIN_VIEW)->onBackView(); }
virtual QImage dumpView();
virtual bool dumpViewToFormat( const QImage&, const QString&, const QString& );
-private slots:
+private Q_SLOTS:
void onContextMenuRequested(QContextMenuEvent*);
private:
myEndPnt.setX(theEvent->x()); myEndPnt.setY(theEvent->y());
bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier);
- if (!aHasShift) emit deselection();
+ if (!aHasShift) Q_EMIT deselection();
if (myStartPnt == myEndPnt)
{
myAISContext->UpdateCurrentViewer();
}
- emit selectionChanged();
+ Q_EMIT selectionChanged();
}
/*!
if (!aView || aView->interactionStyle() != SUIT_ViewModel::KEY_FREE)
return;
- emit deselection();
+ Q_EMIT deselection();
if ( !isPreselectionEnabled() ) {
Handle(V3d_View) aView3d = aView->getViewPort()->getView();
myAISContext->Select();
- emit selectionChanged();
+ Q_EMIT selectionChanged();
}
void OCCViewer_Viewer::onViewClosed(OCCViewer_ViewPort3d*)
*/
void OCCViewer_Viewer::performSelectionChanged()
{
- emit selectionChanged();
+ Q_EMIT selectionChanged();
}
/*!
void initView( OCCViewer_ViewWindow* view );
-signals:
+Q_SIGNALS:
void selectionChanged();
void deselection();
-protected slots:
+protected Q_SLOTS:
virtual void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
virtual void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
virtual void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
pal.setColor( QPalette::Background, color );
setPalette( pal );
repaint();
- emit vpChangeBGColor( color );
+ Q_EMIT vpChangeBGColor( color );
}
/*!
*/
void OCCViewer_ViewPort::mousePressEvent( QMouseEvent *e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void OCCViewer_ViewPort::mouseMoveEvent( QMouseEvent* e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void OCCViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void OCCViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e )
{
- emit vpMouseEvent( e );
+ Q_EMIT vpMouseEvent( e );
}
/*!
*/
void OCCViewer_ViewPort::keyPressEvent( QKeyEvent *e )
{
- emit vpKeyEvent( e );
+ Q_EMIT vpKeyEvent( e );
}
/*!
*/
void OCCViewer_ViewPort::keyReleaseEvent( QKeyEvent *e )
{
- emit vpKeyEvent( e );
+ Q_EMIT vpKeyEvent( e );
}
/*!
if ( myPaintersRedrawing )
{
QPainter p( this );
- emit vpDrawExternal( &p );
+ Q_EMIT vpDrawExternal( &p );
myPaintersRedrawing = false;
}
}
// void onCreatePopup( QPopupMenu* );
// void onDestroyPopup( QPopupMenu* );
-public slots:
+public Q_SLOTS:
virtual bool synchronize( OCCViewer_ViewPort* );
-protected slots:
+protected Q_SLOTS:
virtual void onChangeBackground();
-signals:
+Q_SIGNALS:
void vpKeyEvent( QKeyEvent* );
void vpMouseEvent( QMouseEvent* );
void vpDrawExternal( QPainter* );
*/
OCCViewer_ViewPort3d::~OCCViewer_ViewPort3d()
{
- emit vpClosed(this);
+ Q_EMIT vpClosed(this);
Handle(V3d_View) aView = activeView();
if (!aView.IsNull())
aView->Remove();
view->View()->Deactivate();
}
- emit( vpMapped(this) );
+ Q_EMIT( vpMapped(this) );
return true;
}
if ( bgData.isValid() ) {
myBackground = bgData;
updateBackground();
- emit vpChangeBackground( myBackground );
+ Q_EMIT vpChangeBackground( myBackground );
}
}
{
if ( !activeView().IsNull() ) {
activeView()->WindowFit( rect.left(), rect.top(), rect.right(), rect.bottom() );
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
}
else
#endif
activeView()->Zoom( x0 + y0, 0, x + y, 0 );
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
}
{
if ( !activeView().IsNull() ) {
activeView()->Place( x, y, myScale );
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
}
{
if ( !activeView().IsNull() ) {
activeView()->Pan( dx, dy, 1.0 );
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
}
default:
break;
}
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
// setZSize( getZSize() );
}
activeView()->SetZSize( 0.0 );
#endif
activeView()->Update();
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
}
activeView()->FitAll( margin, withZ, upd );
#endif
activeView()->SetZSize(0.);
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
/*!
// double zsize = getZSize();
if ( !activeView().IsNull() ) {
activeView()->Reset();
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
// setZSize( zsize );
}
}
double X, Y, Z;
activeView()->Convert( x, y, X, Y, Z );
activeView()->Rotate( 0, 0, degrees * M_PI / 180., X, Y, Z );
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
/*!
return;
activeView()->SetAxialScale( xScale, yScale, zScale );
- emit vpTransformed( this );
+ Q_EMIT vpTransformed( this );
}
/*!
void showStaticTrihedron( bool );
-signals:
+Q_SIGNALS:
void vpChangeBackground( const Qtx::BackgroundData& );
void vpClosed(OCCViewer_ViewPort3d*);
void vpMapped(OCCViewer_ViewPort3d*);
-public slots:
+public Q_SLOTS:
virtual bool synchronize( OCCViewer_ViewPort* );
protected:
virtual bool isDefault() const;
virtual bool eventFilter( QObject*, QEvent* );
-private slots:
+private Q_SLOTS:
void onDrawViewPort();
protected:
return true;
case QEvent::MouseButtonDblClick:
- emit mouseDoubleClicked(this, (QMouseEvent*)e);
+ Q_EMIT mouseDoubleClicked(this, (QMouseEvent*)e);
return true;
case QEvent::Wheel:
{
QContextMenuEvent * aEvent = (QContextMenuEvent*)e;
if ( aEvent->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( aEvent );
+ Q_EMIT contextMenuRequested( aEvent );
}
return true;
case QEvent::KeyPress:
- emit keyPressed(this, (QKeyEvent*) e);
+ Q_EMIT keyPressed(this, (QKeyEvent*) e);
return true;
default:
switch ( myOperation ) {
case WINDOWFIT:
if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( WINDOWFIT );
+ Q_EMIT vpTransformationStarted ( WINDOWFIT );
break;
case PANGLOBAL:
if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( PANGLOBAL );
+ Q_EMIT vpTransformationStarted ( PANGLOBAL );
break;
case ZOOMVIEW:
if ( theEvent->button() == Qt::LeftButton ) {
myViewPort->startZoomAtPoint( myStartX, myStartY );
- emit vpTransformationStarted ( ZOOMVIEW );
+ Q_EMIT vpTransformationStarted ( ZOOMVIEW );
}
break;
activateZoom();
}
else if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( PANVIEW );
+ Q_EMIT vpTransformationStarted ( PANVIEW );
break;
case ROTATE:
}
else if ( theEvent->button() == Qt::LeftButton ) {
myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
- emit vpTransformationStarted ( ROTATE );
+ Q_EMIT vpTransformationStarted ( ROTATE );
}
break;
}
}
else
- emit mousePressed(this, theEvent);
+ Q_EMIT mousePressed(this, theEvent);
break;
}
/* notify that we start a transformation */
if ( transformRequested() )
- emit vpTransformationStarted ( myOperation );
+ Q_EMIT vpTransformationStarted ( myOperation );
}
if ( transformRequested() )
setTransformInProcess( true );
default:
if ( myRotationPointSelection || isSketcherStyle() )
{
- emit mouseMoving( this, theEvent );
+ Q_EMIT mouseMoving( this, theEvent );
}
else
{
myViewPort->setCursor( handCursor );
}
}
- emit mouseMoving( this, theEvent );
+ Q_EMIT mouseMoving( this, theEvent );
}
else if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD &&
aButton == Qt::RightButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) ||
}
}
else
- emit mouseMoving( this, theEvent );
+ Q_EMIT mouseMoving( this, theEvent );
}
}
}
}
}
- emit mouseReleased(this, theEvent);
+ Q_EMIT mouseReleased(this, theEvent);
if(theEvent->button() == Qt::RightButton && prevState == -1)
{
QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
theEvent->pos(), theEvent->globalPos() );
- emit contextMenuRequested( &aEvent );
+ Q_EMIT contextMenuRequested( &aEvent );
}
}
break;
}
if ( transformRequested() )
- emit vpTransformationFinished (myOperation);
+ Q_EMIT vpTransformationFinished (myOperation);
setTransformInProcess( false );
setTransformRequested( NOTHING );
*/
void OCCViewer_ViewWindow::onFrontView()
{
- emit vpTransformationStarted ( FRONTVIEW );
+ Q_EMIT vpTransformationStarted ( FRONTVIEW );
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xpos);
onViewFitAll();
- emit vpTransformationFinished ( FRONTVIEW );
+ Q_EMIT vpTransformationFinished ( FRONTVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onBackView()
{
- emit vpTransformationStarted ( BACKVIEW );
+ Q_EMIT vpTransformationStarted ( BACKVIEW );
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xneg);
onViewFitAll();
- emit vpTransformationFinished ( BACKVIEW );
+ Q_EMIT vpTransformationFinished ( BACKVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onTopView()
{
- emit vpTransformationStarted ( TOPVIEW );
+ Q_EMIT vpTransformationStarted ( TOPVIEW );
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zpos);
onViewFitAll();
- emit vpTransformationFinished ( TOPVIEW );
+ Q_EMIT vpTransformationFinished ( TOPVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onBottomView()
{
- emit vpTransformationStarted ( BOTTOMVIEW );
+ Q_EMIT vpTransformationStarted ( BOTTOMVIEW );
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zneg);
onViewFitAll();
- emit vpTransformationFinished ( BOTTOMVIEW );
+ Q_EMIT vpTransformationFinished ( BOTTOMVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onLeftView()
{
- emit vpTransformationStarted ( LEFTVIEW );
+ Q_EMIT vpTransformationStarted ( LEFTVIEW );
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Yneg);
onViewFitAll();
- emit vpTransformationFinished ( LEFTVIEW );
+ Q_EMIT vpTransformationFinished ( LEFTVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onRightView()
{
- emit vpTransformationStarted ( RIGHTVIEW );
+ Q_EMIT vpTransformationStarted ( RIGHTVIEW );
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Ypos);
onViewFitAll();
- emit vpTransformationFinished ( RIGHTVIEW );
+ Q_EMIT vpTransformationFinished ( RIGHTVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onClockWiseView()
{
- emit vpTransformationStarted ( CLOCKWISEVIEW );
+ Q_EMIT vpTransformationStarted ( CLOCKWISEVIEW );
myViewPort->rotateXY( 90. );
- emit vpTransformationFinished ( CLOCKWISEVIEW );
+ Q_EMIT vpTransformationFinished ( CLOCKWISEVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onAntiClockWiseView()
{
- emit vpTransformationStarted ( ANTICLOCKWISEVIEW );
+ Q_EMIT vpTransformationStarted ( ANTICLOCKWISEVIEW );
myViewPort->rotateXY( -90. );
- emit vpTransformationFinished ( ANTICLOCKWISEVIEW );
+ Q_EMIT vpTransformationFinished ( ANTICLOCKWISEVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onResetView()
{
- emit vpTransformationStarted( RESETVIEW );
+ Q_EMIT vpTransformationStarted( RESETVIEW );
bool upd = myViewPort->getView()->SetImmediateUpdate( false );
myViewPort->getView()->Reset( false );
myViewPort->fitAll( false, true, false );
myViewPort->getView()->SetImmediateUpdate( upd );
myViewPort->getView()->Update();
- emit vpTransformationFinished( RESETVIEW );
+ Q_EMIT vpTransformationFinished( RESETVIEW );
}
/*!
*/
void OCCViewer_ViewWindow::onFitAll()
{
- emit vpTransformationStarted( FITALLVIEW );
+ Q_EMIT vpTransformationStarted( FITALLVIEW );
myViewPort->fitAll();
- emit vpTransformationFinished( FITALLVIEW );
+ Q_EMIT vpTransformationFinished( FITALLVIEW );
}
/*!
{
SUIT_ViewWindow* vw = myManager->createViewWindow();
//vw->show();
- emit viewCloned( vw );
+ Q_EMIT viewCloned( vw );
}
/*!
Qtx::BackgroundData bgData;
if ( parameters.contains( '=' ) ) // new format - "scale=1.000e+00*centerX=0.000e+00..."
{
- foreach( QString param, data ) {
+ Q_FOREACH( QString param, data ) {
QString paramName = param.section( '=', 0, 0 ).trimmed();
QString paramValue = param.section( '=', 1, 1 ).trimmed();
if ( paramName == "scale" ) params.scale = paramValue.toDouble();
{
QStringList ClipPlaneData = paramValue.split( ';' );
OCCViewer_ClipPlane aPlane;
- foreach( QString ClipPlaneParam, ClipPlaneData )
+ Q_FOREACH( QString ClipPlaneParam, ClipPlaneData )
{
QString ClipPlane_paramName = ClipPlaneParam.section( '~', 0, 0 ).trimmed();
QString ClipPlane_paramValue = ClipPlaneParam.section( '~', 1, 1 ).trimmed();
*/
void OCCViewer_ViewWindow::showEvent( QShowEvent* theEvent )
{
- emit Show( theEvent );
+ Q_EMIT Show( theEvent );
}
/*!
*/
void OCCViewer_ViewWindow::hideEvent( QHideEvent* theEvent )
{
- emit Hide( theEvent );
+ Q_EMIT Hide( theEvent );
}
toolMgr()->show( ReturnTo3dViewId );
else
toolMgr()->hide( ReturnTo3dViewId );
- if ( isVisible3dView ) emit returnedTo3d( );
+ if ( isVisible3dView ) Q_EMIT returnedTo3d( );
}
anAction->setStatusTip( tr( "DSC_MINIMIZE_VIEW" ) );
if ( anAction2 && my2dMode != No2dMode ) toolMgr()->show( ReturnTo3dViewId );
if (toSendSignal) {
- emit maximized( this, true );
+ Q_EMIT maximized( this, true );
}
}
else {
anAction->setStatusTip( tr( "DSC_MAXIMIZE_VIEW" ) );
if ( anAction2 && my2dMode != No2dMode ) toolMgr()->hide( ReturnTo3dViewId );
if (toSendSignal) {
- emit maximized( this, false );
+ Q_EMIT maximized( this, false );
}
}
}
virtual SUIT_CameraProperties cameraProperties();
-public slots:
+public Q_SLOTS:
virtual void onFrontView();
virtual void onViewFitAll();
virtual void onBackView();
virtual void onMaximizedView();
virtual void returnTo3dView();
-signals:
+Q_SIGNALS:
void vpTransformationStarted(OCCViewer_ViewWindow::OperationType type);
void vpTransformationFinished(OCCViewer_ViewWindow::OperationType type);
void viewCloned( SUIT_ViewWindow* );
void maximized( OCCViewer_ViewWindow*, bool );
void returnedTo3d( );
-protected slots:
+protected Q_SLOTS:
void synchronize( SUIT_ViewWindow* );
public:
protected:
bool eventFilter( QObject*, QEvent* );
-protected slots:
+protected Q_SLOTS:
void onViewCreated( SUIT_ViewWindow* );
void onViewRemoved( SUIT_ViewWindow* );
}
myView->blockSignals( blocked );
- emit( selectionChanged() );
+ Q_EMIT( selectionChanged() );
}
/*!
setModified();
if ( selNum != numberOfSelected() )
- emit selectionChanged();
+ Q_EMIT selectionChanged();
// QTime t2 = QTime::currentTime();
// qDebug( QString( "update tree time = %1 msecs" ).arg( t1.msecsTo( t2 ) ) );
setModified();
if ( selNum != numberOfSelected() )
- emit selectionChanged();
+ Q_EMIT selectionChanged();
}
*/
/*!
disconnect( treeView(), SIGNAL( expanded( const QModelIndex& ) ),
this, SLOT( onExpanded( const QModelIndex& ) ) );
- foreach ( index, indexes ) {
+ Q_FOREACH ( index, indexes ) {
myView->expandAll( index );
}
connect( treeView(), SIGNAL( expanded( const QModelIndex& ) ),
this, SLOT( onExpanded( const QModelIndex& ) ) );
- emit(onExpanded( index));
+ Q_EMIT(onExpanded( index));
}
/*!
QModelIndexList indexes = selectedIndexes();
QModelIndex index;
- foreach ( index, indexes ) {
+ Q_FOREACH ( index, indexes ) {
myView->collapseAll( index );
}
}
}
if ( !lst.isEmpty() )
- emit dropped( lst, obj, action );
+ Q_EMIT dropped( lst, obj, action );
}
*/
/*!
void OB_Browser::onDoubleClicked( QListViewItem* item )
{
if ( item )
- emit doubleClicked( dataObject( item ) );
+ Q_EMIT doubleClicked( dataObject( item ) );
}
*/
typedef QMap<QString, bool> MapOfOpenStates;
void openStates( bool isGet, MapOfOpenStates&, const QModelIndex& theIndex, int theColumn );
-signals:
+Q_SIGNALS:
void selectionChanged();
//void doubleClicked( SUIT_DataObject* );
//void dropped( DataObjectList, SUIT_DataObject*, int );
-private slots:
+private Q_SLOTS:
void onExpandAll();
void onCollapseAll();
virtual void onExpanded( const QModelIndex& ) {}
void Plot2d_AnalyticalCurveDlg::init()
{
AnalyticalCurveList curves = myContainer->getAnalyticalCurves();
- foreach ( Plot2d_AnalyticalCurve* curve, curves ) {
+ Q_FOREACH ( Plot2d_AnalyticalCurve* curve, curves ) {
QListWidgetItem* item = new QListWidgetItem( curve->getName() );
item->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled );
item->setCheckState( curve->isActive() ? Qt::Checked : Qt::Unchecked );
f->updateAnalyticalCurves();
AnalyticalCurveList curves = myContainer->getAnalyticalCurves();
- foreach ( Plot2d_AnalyticalCurve* curve, curves ) {
+ Q_FOREACH ( Plot2d_AnalyticalCurve* curve, curves ) {
initPropsFromCurve(curve);
}
selectionChanged();
void Plot2d_AnalyticalCurveDlg::removeCurve()
{
QList<QListWidgetItem*> items = myCurvesList->selectedItems();
- foreach( QListWidgetItem* item, items ) {
+ Q_FOREACH( QListWidgetItem* item, items ) {
Plot2d_AnalyticalCurve* curve = (Plot2d_AnalyticalCurve*)( item->data( Qt::UserRole ).value<void*>() );
delete item;
if ( propStatus( curve ) == ItemAdded ) {
QColor propColor( Plot2d_AnalyticalCurve* = 0, const QColor& def = QColor() );
bool propAutoAssign( Plot2d_AnalyticalCurve* = 0, bool def = true );
-private slots:
+private Q_SLOTS:
void addCurve();
void removeCurve();
void updateCurve();
public:
Updater( QWidget* parent );
~Updater();
-signals:
+Q_SIGNALS:
void update();
};
// gets mode : 0 - Fit all; 1 - Fit horizontal, 2 - Fit vertical
int getMode();
-protected slots:
+protected Q_SLOTS:
// called when range mode changed
void onModeChanged(int);
public:
Plot2d_DeviationData(const double *min, const double *max,const QList<int>& idx)
{
- foreach(int index,idx) {
+ Q_FOREACH(int index,idx) {
myMin[index] = min[index];
myMax[index] = max[index];
}
QColor getColor() const;
-private slots:
+private Q_SLOTS:
void updatePreview();
private:
bool isSetAsDefault();
-protected slots:
+protected Q_SLOTS:
void onMainTitleChecked();
void onXTitleChecked();
void onYTitleChecked();
virtual bool eventFilter( QObject*, QEvent* );
-public slots:
+public Q_SLOTS:
void onToolTip( QPoint, QString&, QFont&, QRect&, QRect& );
private:
{
objectList olist;
getObjects( olist );
- foreach ( Plot2d_Object* o, olist )
+ Q_FOREACH ( Plot2d_Object* o, olist )
updateObject( o, false );
myPlot->replot();
if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
void Plot2d_ViewFrame::displayCurves( const curveList& curves, bool update )
{
objectList objects;
- foreach ( Plot2d_Curve* curve, curves )
+ Q_FOREACH ( Plot2d_Curve* curve, curves )
objects << curve;
displayObjects( objects, update );
}
void Plot2d_ViewFrame::eraseCurves( const curveList& curves, bool update )
{
objectList objects;
- foreach ( Plot2d_Curve* curve, curves )
+ Q_FOREACH ( Plot2d_Curve* curve, curves )
objects << curve;
eraseObjects( objects, update );
}
void Plot2d_ViewFrame::displayObjects( const objectList& objects, bool update )
{
//myPlot->setUpdatesEnabled( false ); // call this function deprecate update of legend
- foreach ( Plot2d_Object* object, objects )
+ Q_FOREACH ( Plot2d_Object* object, objects )
displayObject( object, false );
fitAll();
//myPlot->setUpdatesEnabled( true );
*/
void Plot2d_ViewFrame::eraseObjects( const objectList& objects, bool update )
{
- foreach ( Plot2d_Object* object, objects )
+ Q_FOREACH ( Plot2d_Object* object, objects )
eraseObject( object, false );
// fitAll();
void Plot2d_ViewFrame::eraseBasicObjects( const QList<QwtPlotItem*> &objects, bool update)
{
- foreach ( QwtPlotItem* object, objects )
+ Q_FOREACH ( QwtPlotItem* object, objects )
eraseBasicObject( object, false );
// fitAll();
if ( update )
return;
if(picker->pMarkers.empty())
return;
- foreach(QwtPlotMarker *mrker,picker->pMarkers)
+ Q_FOREACH(QwtPlotMarker *mrker,picker->pMarkers)
{
bool isV2 = mrker->yAxis() == QwtPlot::yRight;
xMin = qMin( xMin, mrker->xValue() );
}
if ( update )
myPlot->replot();
- emit vpCurveChanged();
+ Q_EMIT vpCurveChanged();
}
/*!
if ( update )
fitAll();
- emit vpModeHorChanged();
+ Q_EMIT vpModeHorChanged();
}
/*!
if ( update )
fitAll();
- emit vpModeVerChanged();
+ Q_EMIT vpModeVerChanged();
}
/*!
processFiltering(true);
if ( update )
fitAll();
- emit vpNormLModeChanged();
+ Q_EMIT vpNormLModeChanged();
}
/*!
processFiltering(true);
if ( update )
fitAll();
- emit vpNormLModeChanged();
+ Q_EMIT vpNormLModeChanged();
}
/*!
processFiltering(true);
if ( update )
fitAll();
- emit vpNormRModeChanged();
+ Q_EMIT vpNormRModeChanged();
}
/*!
processFiltering(true);
if ( update )
fitAll();
- emit vpNormRModeChanged();
+ Q_EMIT vpNormRModeChanged();
}
/*!
{
QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
me.pos(), me.globalPos() );
- emit contextMenuRequested( &aEvent );
+ Q_EMIT contextMenuRequested( &aEvent );
}
else {
#ifndef NO_ANALYTICAL_CURVES
\brief Deselect all analytical curves.
*/
void Plot2d_ViewFrame::deselectAnalyticalCurves() {
- foreach(Plot2d_AnalyticalCurve* c, myAnalyticalCurves) {
+ Q_FOREACH(Plot2d_AnalyticalCurve* c, myAnalyticalCurves) {
c->setSelected(false);
}
}
QString getXmlVisualParameters();
bool setXmlVisualParameters(const QString&);
-public slots:
+public Q_SLOTS:
void onViewPan();
void onViewZoom();
void onViewFitAll();
bool plotMouseMoved( const QMouseEvent& );
void plotMouseReleased( const QMouseEvent& );
-signals:
+Q_SIGNALS:
void vpModeHorChanged();
void vpModeVerChanged();
void vpNormLModeChanged();
newWnd = ( Plot2d_ViewWindow* )vw;
if( newWnd && srcWnd )
- emit cloneView( srcWnd->getViewFrame(), newWnd->getViewFrame() );
+ Q_EMIT cloneView( srcWnd->getViewFrame(), newWnd->getViewFrame() );
return newWnd;
}
protected:
bool insertView(SUIT_ViewWindow* theView);
-public slots:
+public Q_SLOTS:
void createView();
-protected slots:
+protected Q_SLOTS:
void onCloneView();
-signals:
+Q_SIGNALS:
void cloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* );
};
// emits signal
if ( p && p->inherits( "SUIT_ViewWindow" ) )
- emit viewCloned( (SUIT_ViewWindow*)p );
+ Q_EMIT viewCloned( (SUIT_ViewWindow*)p );
}
}
void clearPrs();
void setAutoDel(bool theDel);
-signals:
+Q_SIGNALS:
void viewCloned( SUIT_ViewWindow* );
-protected slots:
+protected Q_SLOTS:
void onChangeBgColor();
void onDumpView();
void onShowToolbar();
if ( watched == myViewFrame ) {
switch( e->type() ) {
case QEvent::MouseButtonPress:
- emit mousePressed( this, (QMouseEvent*)e );
+ Q_EMIT mousePressed( this, (QMouseEvent*)e );
return true;
case QEvent::MouseButtonRelease:
- emit mouseReleased( this, (QMouseEvent*)e );
+ Q_EMIT mouseReleased( this, (QMouseEvent*)e );
return true;
case QEvent::MouseMove:
- emit mouseMoving( this, (QMouseEvent*)e );
+ Q_EMIT mouseMoving( this, (QMouseEvent*)e );
return true;
default:
break;
virtual void RefreshDumpImage();
-public slots:
+public Q_SLOTS:
void onChangeHorMode();
void onChangeVerMode();
void onChangeCurveMode();
const QString& );
virtual QString filter() const;
-signals:
+Q_SIGNALS:
void cloneView();
private:
virtual QSize sizeHint() const;
-public slots:
+public Q_SLOTS:
void cut();
void paste();
void clear();
cursor.insertText(first_match);
_tab_mode = false;
if (doc == QString(""))
- emit updateDoc(formatDocHTML("(no documentation available)\n"));
+ Q_EMIT updateDoc(formatDocHTML("(no documentation available)\n"));
else
- emit updateDoc(formatDocHTML(doc));
+ Q_EMIT updateDoc(formatDocHTML(doc));
}
else
{
if (base == matches[0])
{
doc = formatDocHTML(doc);
- emit updateDoc(doc);
+ Q_EMIT updateDoc(doc);
}
// Print all matching completion in a "undo-able" block
PyConsole_EnhEditor(PyConsole_EnhInterp * interp, QWidget * parent=0);
virtual ~PyConsole_EnhEditor() {}
-signals:
+Q_SIGNALS:
/**
* Signal emitted by the editor widget when the doc string should be updated.
* @param doc a HTML block with the formatted doc string.
PyInterp_Watcher() : QObject( 0 ) {}
virtual ~PyInterp_Watcher() {}
-public slots:
+public Q_SLOTS:
void onDestroyed( QObject* o ) { PyInterp_Dispatcher::Get()->objectDestroyed( o ); }
};
*/
void QDS_CheckBox::onParamChanged()
{
- emit paramChanged();
+ Q_EMIT paramChanged();
}
/*!
virtual void clear();
-signals:
+Q_SIGNALS:
void toggled( bool );
-private slots:
+private Q_SLOTS:
void onParamChanged();
void onStateChanged( int );
{
onParamChanged();
QString str = getString();
- emit activated( integerValue() );
- emit activated( str );
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT activated( integerValue() );
+ Q_EMIT activated( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
}
void QDS_ComboBox::onTextChanged( const QString& /*txt*/ )
{
onParamChanged();
- emit paramChanged();
+ Q_EMIT paramChanged();
QString str = getString();
- emit paramChanged( str );
+ Q_EMIT paramChanged( str );
}
/*!
{
onParamChanged();
QString str = getString();
- emit activated( id );
- emit activated( str );
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT activated( id );
+ Q_EMIT activated( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
}
int stringToValue( const QString& ) const;
QString valueToString( const int ) const;
-signals:
+Q_SIGNALS:
void activated( int );
void activated( const QString& );
-protected slots:
+protected Q_SLOTS:
virtual void onActivated( int );
virtual void onTextChanged( const QString& );
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
}
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
bool isCustomTr() const;
void enableCustomTr( const bool );
-signals:
+Q_SIGNALS:
void paramChanged();
void paramChanged( QString& );
-public slots:
+public Q_SLOTS:
void setEnabled( bool );
-protected slots:
+protected Q_SLOTS:
virtual void onParamChanged();
-private slots:
+private Q_SLOTS:
void onInitDatum();
void onDestroyed( QObject* );
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
virtual QString getString() const;
-signals:
+Q_SIGNALS:
void returnPressed();
-protected slots:
+protected Q_SLOTS:
virtual void onParamChanged();
-private slots:
+private Q_SLOTS:
void onTextChanged( const QString& );
protected:
{
onParamChanged();
QString str = getString();
- emit activated( newId );
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT activated( newId );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
}
return;
onParamChanged();
- emit paramChanged();
+ Q_EMIT paramChanged();
QString str = getString();
- emit paramChanged( str );
+ Q_EMIT paramChanged( str );
}
/*!
{
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
}
virtual QString getString() const;
-signals:
+Q_SIGNALS:
void activated( int );
-protected slots:
+protected Q_SLOTS:
virtual void onToggled( bool );
protected:
{
onParamChanged();
QString str = QString::number( val );
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
virtual QString getString() const;
-private slots:
+private Q_SLOTS:
void onValueChanged( int );
protected:
onParamChanged();
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
virtual QString getString() const;
-private slots:
+private Q_SLOTS:
void onValueChanged( double );
protected:
QString str = getString();
- emit paramChanged();
- emit paramChanged( str );
+ Q_EMIT paramChanged();
+ Q_EMIT paramChanged( str );
}
/*!
virtual QString getString() const;
-signals:
+Q_SIGNALS:
void returnPressed();
-private slots:
+private Q_SLOTS:
void onTextChanged();
protected:
}
QGradientStops stops = gradient.stops();
QGradientStop stop;
- foreach ( stop, stops )
+ Q_FOREACH ( stop, stops )
{
data << QString::number( stop.first );
data << colorToString( stop.second );
}
QGradientStops stops = gradient.stops();
QGradientStop stop;
- foreach ( stop, stops )
+ Q_FOREACH ( stop, stops )
{
data << QString::number( stop.first );
data << colorToString( stop.second );
}
QGradientStops stops = gradient.stops();
QGradientStop stop;
- foreach ( stop, stops )
+ Q_FOREACH ( stop, stops )
{
data << QString::number( stop.first );
data << colorToString( stop.second );
else {
QMap<QString, QString> dmap;
// background data
- foreach( QString d, data ) {
+ Q_FOREACH( QString d, data ) {
QStringList items = d.split( kwSep, QString::KeepEmptyParts );
if ( items.count() > 0 ) {
QString kw = items.takeFirst().trimmed().toLower(); // keyword
}
}
- emit selected( a );
+ Q_EMIT selected( a );
}
/*!
void setEnabled( bool );
-public slots:
+public Q_SLOTS:
void setExclusive( const bool );
void setUsesDropDown( const bool );
-signals:
+Q_SIGNALS:
void selected( QAction* );
-private slots:
+private Q_SLOTS:
void onActivated( int );
void onTriggered( QAction* );
{
QMenu* m = ::qobject_cast<QMenu*>( sender() );
if ( m )
- emit menuAboutToShow( m );
+ Q_EMIT menuAboutToShow( m );
}
/*!
{
QMenu* m = ::qobject_cast<QMenu*>( sender() );
if ( m )
- emit menuAboutToHide( m );
+ Q_EMIT menuAboutToHide( m );
}
/*!
}
}
QList<QAction*> alist = mw->actions();
- foreach( a, alist ) mw->removeAction( a );
+ Q_FOREACH( a, alist ) mw->removeAction( a );
// collect all registered menus by group id
QMap<int, NodeList> idMap;
// rebuild menu: 2. insert back all foreign actions
for( formapit = foreign.begin(); formapit != foreign.end(); ++formapit ) {
preva = formapit.key();
- foreach( a, formapit.value() )
+ Q_FOREACH( a, formapit.value() )
mw->insertAction( preva, a );
}
bool isEmptyEnabled( const int ) const;
void setEmptyEnabled( const int, const bool );
-private slots:
+private Q_SLOTS:
void onAboutToShow();
void onAboutToHide();
void onDestroyed( QObject* );
-signals:
+Q_SIGNALS:
void menuAboutToShow( QMenu* );
void menuAboutToHide( QMenu* );
void triggerUpdate();
virtual void updateContent();
-private slots:
+private Q_SLOTS:
void onUpdateContent();
private:
int id = actionId( a );
if ( id != -1 )
- emit triggered( id );
- emit triggered( a );
+ Q_EMIT triggered( id );
+ Q_EMIT triggered( a );
}
/*!
void clear();
-signals:
+Q_SIGNALS:
void triggered( int );
void triggered( QAction* );
-private slots:
+private Q_SLOTS:
void onChanged();
void onActionTriggered( bool = false );
int find( QToolBar* ) const;
-protected slots:
+protected Q_SLOTS:
void onToolBarDestroyed();
protected:
void init( Qt::Orientation );
void internalUpdate();
-private slots:
+private Q_SLOTS:
void updateState();
void browse();
QLabel* label();
-private slots:
+private Q_SLOTS:
void updateState();
private:
*/
void QtxColorButton::onClicked( bool )
{
- emit clicked( color() );
+ Q_EMIT clicked( color() );
}
/*!
updateState();
if ( old != color() )
- emit changed( color() );
+ Q_EMIT changed( color() );
}
/*!
setColor( c );
if ( old != color() )
- emit changed( color() );
+ Q_EMIT changed( color() );
}
/*!
QString autoText() const;
void setAutoText( const QString& );
-signals:
+Q_SIGNALS:
void clicked( QColor );
void changed( QColor );
-private slots:
+private Q_SLOTS:
void onClicked( bool );
void onToggled( bool );
if ( idx != -1 )
{
resetClear();
- emit activatedId( id( idx ) );
+ Q_EMIT activatedId( id( idx ) );
}
}
bool hasId( const int ) const;
void setId( const int, const int );
-signals:
+Q_SIGNALS:
void activatedId( int );
-private slots:
+private Q_SLOTS:
void onCurrentChanged( int );
protected:
if ( testButtonFlags( OK ) || testButtonFlags( Yes ) )
accept();
else if ( testButtonFlags( Apply ) && isButtonEnabled( Apply ) )
- emit dlgApply();
+ Q_EMIT dlgApply();
e->accept();
}
if ( e->key() == Qt::Key_F1 && testButtonFlags( Help ) && isButtonEnabled( Help ) )
{
e->accept();
- emit dlgHelp();
+ Q_EMIT dlgHelp();
}
if ( e->key() == Qt::Key_Tab && e->modifiers() & Qt::ControlModifier )
switch ( id )
{
case OK:
- emit dlgOk();
+ Q_EMIT dlgOk();
break;
case Cancel:
- emit dlgCancel();
+ Q_EMIT dlgCancel();
break;
case Close:
- emit dlgClose();
+ Q_EMIT dlgClose();
break;
case Yes:
- emit dlgYes();
+ Q_EMIT dlgYes();
break;
case No:
- emit dlgNo();
+ Q_EMIT dlgNo();
break;
}
}
{
int id = buttonId( (QAbstractButton*)sender() );
if ( id != -1 )
- emit dlgButton( id );
+ Q_EMIT dlgButton( id );
}
/*!
uint setAlignment( uint align );
static void setUnits( QLabel*, const QString& );
-signals:
+Q_SIGNALS:
void dlgButton( int );
void dlgParamChanged();
void dlgClose();
void dlgCancel();
-public slots:
+public Q_SLOTS:
void update();
virtual void setVisible( bool );
-protected slots:
+protected Q_SLOTS:
virtual void accept();
virtual void reject();
-private slots:
+private Q_SLOTS:
void onAccept();
void onReject();
void onButton();
QMainWindow* mainWindow() const;
-private slots:
+private Q_SLOTS:
void onAboutToShow();
protected:
myOrientation = o;
- emit orientationChanged( myOrientation );
+ Q_EMIT orientationChanged( myOrientation );
}
/*!
Qt::Orientation orientation() const;
-signals:
+Q_SIGNALS:
void orientationChanged( Qt::Orientation );
-public slots:
+public Q_SLOTS:
virtual void setVisible( bool );
protected:
virtual QValidator::State validate( QString&, int& ) const;
-protected slots:
+protected Q_SLOTS:
virtual void onTextChanged( const QString& );
protected:
mySlider->blockSignals( true );
mySlider->setValue( aNewValue );
mySlider->blockSignals( false );
- emit valueChanged( theValue );
+ Q_EMIT valueChanged( theValue );
}
/*!
void setUnit( QString& );
-public slots:
+public Q_SLOTS:
void setValue( int );
-private slots:
+private Q_SLOTS:
void DoubleSpinHasChanged( double );
-signals:
+Q_SIGNALS:
void valueChanged( double );
private:
myI->blockSignals( false );
myU->blockSignals( false );
- emit( changed( currentFont() ) );
+ Q_EMIT( changed( currentFont() ) );
}
/*!
{
myCustomFams->setCurrentIndex( myCustomFams->findText( fam ) );
if ( !myCustomFams->signalsBlocked() )
- emit( changed( currentFont() ) );
+ Q_EMIT( changed( currentFont() ) );
}
}
mySize->blockSignals( blocked );
if ( !myFamily->signalsBlocked() )
- emit( changed( currentFont() ) );
+ Q_EMIT( changed( currentFont() ) );
}
void QtxFontEdit::onPropertyChanged()
{
- emit( changed( currentFont() ) );
+ Q_EMIT( changed( currentFont() ) );
}
/*!
void setSizes( const QList<int>& = QList<int>() );
QList<int> sizes() const;
-signals:
+Q_SIGNALS:
void changed( const QFont& );
-private slots:
+private Q_SLOTS:
void onPreview( bool );
void onFontChanged( const QFont& );
void onPropertyChanged();
QWidget* widget() const;
void setWidget( QWidget* );
-public slots:
+public Q_SLOTS:
virtual void setVisible( bool );
protected:
virtual void stepBy( int );
-protected slots:
+protected Q_SLOTS:
virtual void onTextChanged( const QString& );
protected:
mySlider->blockSignals( true );
mySlider->setValue( theValue );
mySlider->blockSignals( false );
- emit valueChanged( theValue );
+ Q_EMIT valueChanged( theValue );
}
/*!
void setUnit( QString& );
-public slots:
+public Q_SLOTS:
void setValue( int );
-signals:
+Q_SIGNALS:
void valueChanged( int );
-private slots:
+private Q_SLOTS:
void IntSpinHasChanged( int );
private:
myFrame->hide();
if ( numActions > 0 )
- emit triggered( numActions );
+ Q_EMIT triggered( numActions );
}
/*!
if ( idx < 0 )
return;
- emit triggered( idx + 1 );
+ Q_EMIT triggered( idx + 1 );
}
/*!
void setLinesNumber( const int );
void setCharsNumber( const int );
-signals:
+Q_SIGNALS:
void triggered( int );
-private slots:
+private Q_SLOTS:
void onChanged();
void onMultiple( const int );
void onSingle( bool = false );
setCurrentItem( cur );
- emit itemEdited( idx );
- emit itemEdited( item( idx ) );
+ Q_EMIT itemEdited( idx );
+ Q_EMIT itemEdited( item( idx ) );
}
}
updateEditor();
if ( idx != pos )
- emit itemMoved( idx, pos );
+ Q_EMIT itemMoved( idx, pos );
}
/*!
void createItem( const int = -1 );
void deleteItem( const int = -1 );
-signals:
+Q_SIGNALS:
void itemEdited( int );
void itemEdited( QListWidgetItem* );
void itemMoved( int, int );
-public slots:
+public Q_SLOTS:
virtual void setEditEnabled( bool );
virtual void setDefaultEditAction( bool );
virtual void setModificationEnabled( bool );
virtual void setValidator( const QValidator* );
virtual void setContentsPos( int, int );
-private slots:
+private Q_SLOTS:
void onContentsMoving( int, int );
protected:
QString link = a->data().toString();
if ( !link.isEmpty() && myLinks.contains( link ) )
- emit activated( link );
+ Q_EMIT activated( link );
}
void QtxMRUAction::onCleared( bool )
virtual void loadLinks( QtxResourceMgr*, const QString&, const bool = true );
virtual void saveLinks( QtxResourceMgr*, const QString&, const bool = true ) const;
-public slots:
+public Q_SLOTS:
void clear();
-signals:
+Q_SIGNALS:
void activated( const QString& );
-private slots:
+private Q_SLOTS:
void onActivated();
void onAboutToShow();
void onCleared( bool );
protected:
virtual bool event( QEvent* );
-private slots:
+private Q_SLOTS:
void onDestroyed( QObject* );
private:
virtual void setTitleMode( const TitleMode );
virtual void setTitleAlignment( const Qt::Alignment );
-public slots:
+public Q_SLOTS:
virtual void setVisible( bool );
private:
void setActiveAction( QAction* );
QAction* activeAction() const;
-private slots:
+private Q_SLOTS:
void onClicked( bool );
void onTriggered( QAction* );
void onActionChanged();
virtual void updateContents();
-signals:
+Q_SIGNALS:
void resourceChanged( int );
void resourceChanged( QString&, QString& );
void resourcesChanged( const QMap<int, QString>& );
-public slots:
+public Q_SLOTS:
virtual void setVisible( bool );
protected:
bool isFixedSize() const;
void setFixedSize( const bool );
-private slots:
+private Q_SLOTS:
void onItemSelectionChanged();
protected:
virtual QVariant optionValue( const QString& ) const;
virtual void setOptionValue( const QString&, const QVariant& );
-private slots:
+private Q_SLOTS:
void setIcon( int );
private:
fileNameChanged( id, fName );
if ( id == defaultEntry() )
- emit fileNameChanged( fName );
+ Q_EMIT fileNameChanged( fName );
}
/*!
fileNameChanged( id, fileName( id ) );
if ( id == defaultEntry() )
- emit fileNameChanged( fileName() );
+ Q_EMIT fileNameChanged( fileName() );
}
/*!
QString filter() const;
void setFilter( const QString& );
-signals:
+Q_SIGNALS:
void fileNameChanged( QString );
-public slots:
+public Q_SLOTS:
virtual void setVisible( bool );
-protected slots:
+protected Q_SLOTS:
void validate();
-private slots:
+private Q_SLOTS:
void onBrowse();
void onReturnPressed();
void onTextChanged( const QString& );
QString pathFilter() const;
void setPathFilter( const QString& );
-private slots:
+private Q_SLOTS:
void onBrowse( bool = false );
protected:
bool eventFilter( QObject*, QEvent* );
-protected slots:
+protected Q_SLOTS:
void onUp( bool = false );
void onDown( bool = false );
void onInsert( bool = false );
bool result( QtxEvalParser* p ) const;
QVariant parameter( const QString&, const int = -1 ) const;
-private slots:
+private Q_SLOTS:
void onSelectionDestroyed( QObject* );
private:
virtual bool event( QEvent* );
virtual bool eventFilter( QObject*, QEvent* );
-public slots:
+public Q_SLOTS:
virtual void find();
virtual void findNext();
virtual void findPrevious();
virtual void findFirst();
virtual void findLast();
-private slots:
+private Q_SLOTS:
void find( const QString&, int = fAny );
void modifierSwitched();
static bool isValidKey( int );
-private slots:
+private Q_SLOTS:
void onCliked();
void onEditingFinished();
virtual void focusOutEvent( QFocusEvent* );
virtual bool checkUniqueness( QTreeWidgetItem*, const QString& );
-private slots:
+private Q_SLOTS:
void onCurrentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* );
private:
*/
void QtxSlider::SliderHasMoved( int theValue )
{
- emit valueUpdated( theValue );
+ Q_EMIT valueUpdated( theValue );
}
/*!
void setSingleStep( int );
-private slots:
+private Q_SLOTS:
void SliderHasMoved( int );
-signals:
+Q_SIGNALS:
void valueUpdated( int );
protected:
void readSettings( QtxResourceMgr*, const QString& = QString() );
-public slots:
+public Q_SLOTS:
void setMessage( const QString&,
const int,
const QColor& = QColor() );
if ( oldTxt != newTxt )
{
- emit headerEdited( hdr, sec );
- emit headerEdited( hdr == horizontalHeader() ? Horizontal : Vertical, sec );
+ Q_EMIT headerEdited( hdr, sec );
+ Q_EMIT headerEdited( hdr == horizontalHeader() ? Horizontal : Vertical, sec );
}
}
virtual bool eventFilter( QObject*, QEvent* );
-signals:
+Q_SIGNALS:
void headerEdited( QHeader*, int );
void headerEdited( Orientation, int );
-public slots:
+public Q_SLOTS:
virtual void hide();
virtual void setHeaderEditable( Orientation, bool );
-private slots:
+private Q_SLOTS:
void onScrollBarMoved( int );
void onHeaderSizeChange( int, int, int );
QMainWindow* mainWindow() const;
-public slots:
+public Q_SLOTS:
virtual void setVisible( bool );
protected:
QRect textRegion, theRegion( -1, -1, -1, -1 );
QFont theFnt = font();
- emit maybeTip( pos, text, theFnt, textRegion, theRegion );
+ Q_EMIT maybeTip( pos, text, theFnt, textRegion, theRegion );
if ( theRegion.isValid() )
{
int wakeUpDelayTime() const { return myWakeUpDelayTime; }
int showDelayTime() const { return myShowDelayTime; }
-signals:
+Q_SIGNALS:
void maybeTip( QPoint, QString&, QFont&, QRect&, QRect& );
-protected slots:
+protected Q_SLOTS:
void onSleepTimeOut();
void onWakeUpTimeOut();
const QItemSelection& deselected )
{
QTreeView::selectionChanged( selected, deselected );
- emit( selectionChanged() );
+ Q_EMIT( selectionChanged() );
}
/*!
*/
void QtxTreeView::emitSortingEnabled( bool enabled )
{
- emit( sortingEnabled( enabled ) );
+ Q_EMIT( sortingEnabled( enabled ) );
}
void QtxTreeView::setModel( QAbstractItemModel* m )
virtual void setModel( QAbstractItemModel* );
-protected slots:
+protected Q_SLOTS:
void onHeaderClicked( int );
void rowsAboutToBeRemoved( const QModelIndex&, int, int );
void selectionChanged( const QItemSelection&, const QItemSelection& );
protected:
void setOpened( const QModelIndex&, const int, bool );
-signals:
+Q_SIGNALS:
void sortingEnabled( bool );
void selectionChanged();
QtxWorkspace( QWidget* = 0 );
virtual ~QtxWorkspace();
-public slots:
+public Q_SLOTS:
void tileVertical();
void tileHorizontal();
};
void perform( const int );
-public slots:
+public Q_SLOTS:
void tile();
void cascade();
void tileVertical();
void tileHorizontal();
-private slots:
+private Q_SLOTS:
void onAboutToShow();
void onTriggered( int );
if ( idx != -1 )
wid = widget( myBar->tabId( idx ) );
- emit contextMenuRequested( wid, p );
+ Q_EMIT contextMenuRequested( wid, p );
}
/*!
{
case ActivateWidget:
myBar->updateActiveState();
- emit activated( activeWidget() );
+ Q_EMIT activated( activeWidget() );
break;
case FocusWidget:
if ( activeWidget() )
myBar->updateActiveState();
- emit activated( activeWidget() );
+ Q_EMIT activated( activeWidget() );
}
/*!
{
QFrame::mousePressEvent( e );
- emit activated( activeWidget() );
+ Q_EMIT activated( activeWidget() );
}
/*!
{
updateCurrent();
- emit activated( activeWidget() );
+ Q_EMIT activated( activeWidget() );
}
/*!
if ( isEmpty() )
{
hide();
- emit deactivated( this );
+ Q_EMIT deactivated( this );
}
else
{
show();
if ( prev != activeWidget() )
- emit activated( activeWidget() );
+ Q_EMIT activated( activeWidget() );
}
}
if ( o->isWidgetType() )
{
if ( e->type() == QEvent::WindowTitleChange || e->type() == QEvent::WindowIconChange )
- emit captionChanged( this );
+ Q_EMIT captionChanged( this );
if ( !e->spontaneous() && e->type() == QEvent::ShowToParent )
- emit shown( this );
+ Q_EMIT shown( this );
if ( !e->spontaneous() && e->type() == QEvent::HideToParent )
- emit hidden( this );
+ Q_EMIT hidden( this );
if ( e->type() == QEvent::FocusIn )
- emit activated( this );
+ Q_EMIT activated( this );
}
return QWidget::eventFilter( o, e );
}
if ( myId != -1 && !tabRect( indexOf( myId ) ).contains( e->pos() ) )
{
myId = -1;
- emit dragActiveTab();
+ Q_EMIT dragActiveTab();
}
QTabBar::mouseMoveEvent( e );
myId = -1;
if ( e->button() == Qt::RightButton )
- emit contextMenuRequested( e->globalPos() );
+ Q_EMIT contextMenuRequested( e->globalPos() );
}
/*!
void QtxWorkstackTabBar::contextMenuEvent( QContextMenuEvent* e )
{
if ( e->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( e->globalPos() );
+ Q_EMIT contextMenuRequested( e->globalPos() );
}
/*!
myWin = myArea->activeWidget();
if ( myWin && oldCur != myWin )
- emit windowActivated( myWin );
+ Q_EMIT windowActivated( myWin );
}
/*!
QList<QSplitter*> splitList;
splitters( mySplit, splitList, true );
splitList << mySplit;
- foreach( QSplitter* split, splitList )
+ Q_FOREACH( QSplitter* split, splitList )
split->setOpaqueResize( opaque );
}
void SetRelativePosition( QWidget* wid, const Qt::Orientation o, const double pos );
void SetRelativePositionInSplitter( QWidget* wid, const double pos );
-signals:
+Q_SIGNALS:
void windowActivated( QWidget* );
-public slots:
+public Q_SLOTS:
void splitVertical();
void splitHorizontal();
-private slots:
+private Q_SLOTS:
void onRename();
void onCloseWindow();
void onDestroyed( QObject* );
void saveState( QDataStream& ) const;
bool restoreState( QDataStream&, QMap<QString, QtxWorkstackChild*>& );
-signals:
+Q_SIGNALS:
void activated( QWidget* );
void contextMenuRequested( QWidget*, QPoint );
void deactivated( QtxWorkstackArea* );
-private slots:
+private Q_SLOTS:
void onClose();
void onCurrentChanged( int );
virtual bool eventFilter( QObject*, QEvent* );
-signals:
+Q_SIGNALS:
void shown( QtxWorkstackChild* );
void hidden( QtxWorkstackChild* );
void activated( QtxWorkstackChild* );
void captionChanged( QtxWorkstackChild* );
-private slots:
+private Q_SLOTS:
void onDestroyed( QObject* );
protected:
void updateActiveState();
-signals:
+Q_SIGNALS:
void dragActiveTab();
void contextMenuRequested( QPoint );
-private slots:
+private Q_SLOTS:
void onCurrentChanged( int );
protected:
myNBSelectedViews = aCheckedNumber;
}
else if( myDlgMode == CreateSubViews ) {
- foreach( QComboBox* aBox, myComboBox )
+ Q_FOREACH( QComboBox* aBox, myComboBox )
aBox->setVisible( true );
- foreach( QLabel* aLabel, myLabels )
+ Q_FOREACH( QLabel* aLabel, myLabels )
aLabel->setVisible( true );
for( int i = myViewsNB; i < 4; i++ ) {
void perform( const int );
-private slots:
+private Q_SLOTS:
void onAboutToShow();
void onTriggered( int );
QMap<QComboBox*, ViewMode> myMapComboBoxMode;
QMap<ViewMode, bool> myMapModeIsBusy;
-private slots:
+private Q_SLOTS:
void onChangeIcons();
void onSplitChanged(int);
protected:
bool insertView(SUIT_ViewWindow* theView);
virtual void closeView(SUIT_ViewWindow* theView);
-public slots:
+public Q_SLOTS:
void createView();
};
protected:
void initView(QxScene_ViewWindow* view);
- protected slots:
+ protected Q_SLOTS:
void onShowToolbar();
void onChangeBgColor();
{
DEBTRACE("QxScene_ViewWindow::closeRequested");
bool isClosed = true;
- emit tryClose(isClosed, this);
+ Q_EMIT tryClose(isClosed, this);
DEBTRACE("isClosed=" << isClosed);
return isClosed;
}
virtual void initLayout();
- void contextPopupEvent(QContextMenuEvent* theEvent) { emit contextMenuRequested( theEvent); }
+ void contextPopupEvent(QContextMenuEvent* theEvent) { Q_EMIT contextMenuRequested( theEvent); }
void setScene(QGraphicsScene* scene) { _scene = scene; }
QGraphicsScene* getScene() { return _scene; }
QGraphicsView* getSceneView() { return _sceneView; }
virtual bool closeRequested();
- signals:
+ Q_SIGNALS:
void tryClose(bool &isClosed, QxScene_ViewWindow* window);
- public slots:
+ public Q_SLOTS:
void onViewFitAll();
void onViewFitArea();
void onViewZoom();
{
if ( module() ) {
QtxActionMenuMgr* mgr = module()->menuMgr();
- foreach( int id, myMenuItems ) mgr->setEmptyEnabled( id, enable );
+ Q_FOREACH( int id, myMenuItems ) mgr->setEmptyEnabled( id, enable );
}
}
if ( view ) activeViewChanged( view );
// get all view currently opened in the study and connect their signals to
// the corresponding slots of the class.
- foreach ( view, d->windows() ) connectView( view );
+ Q_FOREACH ( view, d->windows() ) connectView( view );
}
else {
// hide menus / toolbars in case of error
QMap<int, int> windows() const;
QStringList viewManagers() const;
-public slots:
+public Q_SLOTS:
void initialize( CAM_Application* );
bool activate( SUIT_Study* study );
bool deactivate( SUIT_Study* study );
if ( app )
{
ViewManagerList vmlist = app->viewManagers();
- foreach( SUIT_ViewManager* vm, vmlist )
+ Q_FOREACH( SUIT_ViewManager* vm, vmlist )
{
QVector<SUIT_ViewWindow*> vwlist = vm->getViews();
- foreach ( SUIT_ViewWindow* vw, vwlist )
+ Q_FOREACH ( SUIT_ViewWindow* vw, vwlist )
{
if ( id == vw->getId() )
{
{
QList<SUIT_ViewWindow*> wndlist = tabDesk->windows();
SUIT_ViewWindow* wnd;
- foreach ( wnd, wndlist )
+ Q_FOREACH ( wnd, wndlist )
myResult.append( wnd->getId() );
}
}
ViewManagerList vmList;
app->viewManagers( myType, vmList );
SUIT_ViewManager* viewMgr;
- foreach ( viewMgr, vmList )
+ Q_FOREACH ( viewMgr, vmList )
{
QVector<SUIT_ViewWindow*> vec = viewMgr->getViews();
for ( int i = 0, n = vec.size(); i < n; i++ )
{
QWidgetList wgList = wStack->windowList( wnd );
QWidget* wg;
- foreach ( wg, wgList )
+ Q_FOREACH ( wg, wgList )
{
SUIT_ViewWindow* tmpWnd = dynamic_cast<SUIT_ViewWindow*>( wg );
if ( tmpWnd && tmpWnd != wnd )
{
QList<SUIT_ViewWindow*> wndlist = tabDesk->windows();
SUIT_ViewWindow* wnd;
- foreach ( wnd, wndlist )
+ Q_FOREACH ( wnd, wndlist )
{
Plot2d_ViewWindow* aP2d = dynamic_cast<Plot2d_ViewWindow*>(wnd);
if(aP2d)
void ClearIObjects();
void ClearFilters();
-signals:
+Q_SIGNALS:
void currentSelectionChanged();
-private slots:
+private Q_SLOTS:
void onSelMgrDestroyed();
private:
private:
SALOME_Selection( QObject* /TransferThis/ );
-signals:
+Q_SIGNALS:
void currentSelectionChanged();
};
void clear();
-signals:
+Q_SIGNALS:
void triggered( int );
void triggered( QAction* );
void add( QAction* );
-public slots:
+public Q_SLOTS:
void setExclusive( const bool );
void setUsesDropDown( const bool );
-signals:
+Q_SIGNALS:
void selected( QAction* );
private:
aStudy->children( myEntry, entries );
else
entries.append( myEntry );
- foreach( QString entry, entries )
+ Q_FOREACH( QString entry, entries )
d->Display( aStudy->referencedToEntry( entry ), false, 0 );
}
}
if ( anApp && aStudy ) {
QStringList comps;
aStudy->components( comps );
- foreach( QString comp, comps ) {
+ Q_FOREACH( QString comp, comps ) {
LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( anApp->moduleTitle( comp ), true );
if ( d ) d->EraseAll( false, false, 0 );
}
aStudy->children( myEntry, entries );
else
entries.append( myEntry );
- foreach( QString entry, entries )
+ Q_FOREACH( QString entry, entries )
d->Display( aStudy->referencedToEntry( entry ), false, 0 );
}
}
aStudy->children( myEntry, entries );
else
entries.append( myEntry );
- foreach( QString entry, entries )
+ Q_FOREACH( QString entry, entries )
d->Erase( aStudy->referencedToEntry( entry ), false, false, 0 );
}
}
if ( anApp && aStudy ) {
QStringList comps;
aStudy->components( comps );
- foreach( QString comp, comps ) {
+ Q_FOREACH( QString comp, comps ) {
LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( anApp->moduleTitle( comp ), true );
if ( d ) {
QStringList entries;
aStudy->children( aStudy->centry( comp ), entries );
- foreach( QString entry, entries )
+ Q_FOREACH( QString entry, entries )
d->Display( aStudy->referencedToEntry( entry ), false, 0 );
}
}
if ( anApp && aStudy ) {
QStringList comps;
aStudy->components( comps );
- foreach( QString comp, comps ) {
+ Q_FOREACH( QString comp, comps ) {
LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( anApp->moduleTitle( comp ), true );
if ( d ) d->EraseAll( false, false, 0 );
}
bool isAnalytical = false;
AnalyticalCurveList curves = aViewFrame->getAnalyticalCurves();
- foreach ( Plot2d_AnalyticalCurve* curve, curves ) {
+ Q_FOREACH ( Plot2d_AnalyticalCurve* curve, curves ) {
if(plotItem == curve->plotItem()) {
isAnalytical = true;
curve->setSelected(true);
}
if(isAnalytical) {
myDeselectAnalytical = false;
- emit clearSelected();
+ Q_EMIT clearSelected();
aViewFrame->updateAnalyticalCurves();
myDeselectAnalytical = true;
return;
}
if(!anEntry.isEmpty())
- emit legendSelected( anEntry );
+ Q_EMIT legendSelected( anEntry );
}
}
SPlot2d_Histogram* h = 0;
SPlot2d_Curve* c =0;
- foreach ( Plot2d_Object* o, allObjects ) {
+ Q_FOREACH ( Plot2d_Object* o, allObjects ) {
isSelected = false;
Handle(SALOME_InteractiveObject) io;
Plot2d_ViewFrame* getActiveViewFrame();
Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
-protected slots:
+protected Q_SLOTS:
virtual void onClicked( const QVariant&, int );
-signals:
+Q_SIGNALS:
void legendSelected( const QString& );
void clearSelected();
private:
this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) );
vm->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
- emit viewManagerAdded( vm );
+ Q_EMIT viewManagerAdded( vm );
}
/*
if ( !activeViewManager() && myViewMgrs.count() == 1 )
vm->closeAllViews();
- emit viewManagerRemoved( vm );
+ Q_EMIT viewManagerRemoved( vm );
vm->disconnectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
disconnect( vm, SIGNAL( activated( SUIT_ViewManager* ) ),
return;
myActiveViewMgr = vm;
- emit viewManagerActivated( vm );
+ Q_EMIT viewManagerActivated( vm );
}
/*!Public slot. */
virtual void updateDesktopTitle();
-signals:
+Q_SIGNALS:
/*!emit that view manager added*/
void viewManagerAdded( SUIT_ViewManager* );
/*!emit that view manager removed*/
/*!emit that view manager activated*/
void viewManagerActivated( SUIT_ViewManager* );
-public slots:
+public Q_SLOTS:
virtual void onNewDoc();
virtual bool onNewDoc( const QString& );
virtual void onDesktopClosing( SUIT_Desktop*, QCloseEvent* );
virtual void onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* );
-private slots:
+private Q_SLOTS:
virtual void onViewManagerActivated( SUIT_ViewManager* );
protected:
void STD_MDIDesktop::onWindowActivated( QWidget* w )
{
if ( w && w->inherits( "SUIT_ViewWindow" ) )
- emit windowActivated( (SUIT_ViewWindow*)w );
+ Q_EMIT windowActivated( (SUIT_ViewWindow*)w );
}
/*!
QtxWorkspace* workspace() const;
-private slots:
+private Q_SLOTS:
void onWindowActivated( QWidget* );
protected:
void STD_TabDesktop::onWindowActivated( QWidget* w )
{
if ( w && w->inherits( "SUIT_ViewWindow" ) )
- emit windowActivated( (SUIT_ViewWindow*)w );
+ Q_EMIT windowActivated( (SUIT_ViewWindow*)w );
}
/*!
QtxWorkstack* workstack() const;
-private slots:
+private Q_SLOTS:
void onWindowActivated( QWidget* );
void onArrangeViews();
*/
void SUIT_Application::closeApplication()
{
- emit applicationClosed( this );
+ Q_EMIT applicationClosed( this );
}
/*!
QTimer::singleShot( msec <= 0 ? DEFAULT_MESSAGE_DELAY : msec, this, SLOT( onInfoClear() ) );
if ( prev != msg )
- emit infoChanged( msg );
+ Q_EMIT infoChanged( msg );
}
/*!
bool changed = !myStatusLabel->text().isEmpty();
myStatusLabel->clear();
if ( changed )
- emit infoChanged( QString() );
+ Q_EMIT infoChanged( QString() );
}
/*!
void SUIT_Application::onDesktopActivated()
{
- emit activated( this );
+ Q_EMIT activated( this );
}
/*!
virtual void viewManagers( const QString&, QList<SUIT_ViewManager*>& ) const = 0;
QAction* action( const int ) const;
-signals:
+Q_SIGNALS:
void applicationClosed( SUIT_Application* );
void activated( SUIT_Application* );
void infoChanged( QString );
-public slots:
+public Q_SLOTS:
virtual void updateCommandsStatus();
virtual void onHelpContextModule( const QString&, const QString&, const QString& = QString() );
-private slots:
+private Q_SLOTS:
void onInfoClear();
protected:
const bool = false, QObject* = 0, const char* = 0,
const QString& = QString() );
-protected slots:
+protected Q_SLOTS:
virtual void onDesktopActivated();
private:
QModelIndexList sel = selectedIndexes();
QModelIndex idx;
- foreach( idx, sel ) {
+ Q_FOREACH( idx, sel ) {
SUIT_DataObject* obj = m->object( idx );
if ( obj )
lst.append( obj );
QModelIndexList indexes;
SUIT_DataObject* obj;
- foreach( obj, lst ) {
+ Q_FOREACH( obj, lst ) {
QModelIndex index = m->index( obj );
if ( index.isValid() )
indexes.append( index );
if ( m ) {
SUIT_DataObject* obj = m->object( index );
if ( obj ) {
- emit( clicked( obj ) );
+ Q_EMIT( clicked( obj ) );
m->emitClicked(obj, index);
}
}
if ( m ) {
SUIT_DataObject* obj = m->object( index );
- if ( obj ) emit( doubleClicked( obj ) );
+ if ( obj ) Q_EMIT( doubleClicked( obj ) );
}
}
private:
void init( SUIT_DataObject* );
-signals:
+Q_SIGNALS:
void requestUpdate();
void requestRename();
void clicked( SUIT_DataObject* );
void doubleClicked( SUIT_DataObject* );
-private slots:
+private Q_SLOTS:
void onModelUpdated();
void onClicked( const QModelIndex& );
void onDblClicked( const QModelIndex& );
void SUIT_DataObject::Signal::emitCreated( SUIT_DataObject* object )
{
if ( object )
- emit created( object );
+ Q_EMIT created( object );
}
/*!
myDelLaterObjects.removeAll( object );
else
// object is being destroyed directly or via deleteLater()
- emit destroyed( object );
+ Q_EMIT destroyed( object );
}
}
*/
void SUIT_DataObject::Signal::emitInserted( SUIT_DataObject* object, SUIT_DataObject* parent )
{
- emit( inserted( object, parent ) );
+ Q_EMIT( inserted( object, parent ) );
}
/*!
*/
void SUIT_DataObject::Signal::emitRemoved( SUIT_DataObject* object, SUIT_DataObject* parent )
{
- emit( removed( object, parent ) );
+ Q_EMIT( removed( object, parent ) );
}
/*!
*/
void SUIT_DataObject::Signal::emitModified( SUIT_DataObject* object )
{
- emit( modified( object ) );
+ Q_EMIT( modified( object ) );
}
/*!
void deleteLater( SUIT_DataObject* );
-signals:
+Q_SIGNALS:
void created( SUIT_DataObject* );
void destroyed( SUIT_DataObject* );
void inserted( SUIT_DataObject*, SUIT_DataObject* );
switch ( e->type() )
{
case QEvent::WindowActivate:
- emit activated();
+ Q_EMIT activated();
break;
case QEvent::WindowDeactivate:
- emit deactivated();
+ Q_EMIT deactivated();
break;
default:
break;
*/
void SUIT_Desktop::closeEvent( QCloseEvent* e )
{
- emit closing( this, e );
+ Q_EMIT closing( this, e );
e->ignore();
}
*/
void SUIT_Desktop::emitActivated()
{
- emit activated();
+ Q_EMIT activated();
}
/*!
*/
void SUIT_Desktop::emitMessage( const QString& theMessage )
{
- emit message( theMessage );
+ Q_EMIT message( theMessage );
}
void emitActivated();
void emitMessage( const QString& );
-signals:
+Q_SIGNALS:
void activated();
void deactivated();
void windowActivated( SUIT_ViewWindow* );
void SUIT_ExceptionHandler::cleanUp()
{
- foreach( QtCleanUpFunction f, myCleanUpFunctions )
+ Q_FOREACH( QtCleanUpFunction f, myCleanUpFunctions )
{
f();
}
}
if ( bOk )
- emit filesSelected( files );
+ Q_EMIT filesSelected( files );
return bOk;
}
void addFilter( const QString& );
static bool hasWildCards( const QString& );
-protected slots:
+protected Q_SLOTS:
void accept();
void quickDir( const QString& );
void addQuickDir();
SUIT_LicenseDlg( bool firstShow = true, QWidget* = 0, const char* = 0, bool = true );
virtual ~SUIT_LicenseDlg();
-private slots:
+private Q_SLOTS:
void onAgree();
void onCancel();
void onPrint();
else
{
startOperation();
- emit started( this );
+ Q_EMIT started( this );
}
}
{
abortOperation();
myState = Waiting;
- emit aborted( this );
+ Q_EMIT aborted( this );
stopOperation();
- emit stopped( this );
+ Q_EMIT stopped( this );
}
}
{
commitOperation();
myState = Waiting;
- emit committed( this );
+ Q_EMIT committed( this );
stopOperation();
- emit stopped( this );
+ Q_EMIT stopped( this );
}
}
{
resumeOperation();
myState = Running;
- emit resumed( this );
+ Q_EMIT resumed( this );
}
}
{
suspendOperation();
myState = Suspended;
- emit suspended( this );
+ Q_EMIT suspended( this );
}
}
*/
void SUIT_Operation::startOperation()
{
- emit callSlot();
+ Q_EMIT callSlot();
commit();
}
int execStatus() const;
-signals:
+Q_SIGNALS:
void started( SUIT_Operation* );
void aborted( SUIT_Operation* );
void committed( SUIT_Operation* );
void callSlot();
-public slots:
+public Q_SLOTS:
void start();
void abort();
void commit();
*/
void SUIT_PopupClient::Signal::sendSignal( SUIT_PopupClient* client, QContextMenuEvent* e )
{
- emit contextMenuRequest( client, e );
+ Q_EMIT contextMenuRequest( client, e );
}
void sendSignal( SUIT_PopupClient*, QContextMenuEvent* );
-signals:
+Q_SIGNALS:
void contextMenuRequest( SUIT_PopupClient*, QContextMenuEvent* );
};
if ( d.exists() ) {
d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks );
QStringList l = d.entryList();
- foreach( QString ll, l )
+ Q_FOREACH( QString ll, l )
all_files << d.absoluteFilePath( ll );
}
// backward compatibility: check also user's home directory (if it differs from above one)
if ( home.exists() && d.canonicalPath() != home.canonicalPath() ) {
home.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks );
QStringList l = home.entryList();
- foreach( QString ll, l )
+ Q_FOREACH( QString ll, l )
all_files << home.absoluteFilePath( ll );
}
}
myIsSelChangeEnabled = true;
- emit selectionChanged();
+ Q_EMIT selectionChanged();
}
/*!
bool isSynchronizing() const;
-signals:
+Q_SIGNALS:
void selectionChanged();
protected:
*/
void SUIT_Session::onApplicationClosed( SUIT_Application* theApp )
{
- emit applicationClosed( theApp );
+ Q_EMIT applicationClosed( theApp );
myAppList.removeAll( theApp );
delete theApp;
void insertApplication( SUIT_Application* );
-signals:
+Q_SIGNALS:
void applicationClosed( SUIT_Application* );
protected:
virtual SUIT_ResourceMgr* createResourceMgr( const QString& ) const;
-private slots:
+private Q_SLOTS:
void onApplicationClosed( SUIT_Application* );
void onApplicationActivated( SUIT_Application* );
SUIT_ShortcutMgr();
virtual ~SUIT_ShortcutMgr();
-private slots:
+private Q_SLOTS:
void onActionDestroyed( QObject* );
private:
*/
void SUIT_Study::sendChangesNotification()
{
- emit studyModified( this );
+ Q_EMIT studyModified( this );
}
/*!
theOp->setState( SUIT_Operation::Running );
myOperations.append( theOp );
- emit theOp->started( theOp );
+ Q_EMIT theOp->started( theOp );
operationStarted( theOp );
theOp->startOperation();
theOp->abortOperation();
operationAborted( theOp );
- emit theOp->aborted( theOp );
+ Q_EMIT theOp->aborted( theOp );
stop( theOp );
theOp->commitOperation();
operationCommited( theOp );
- emit theOp->committed( theOp );
+ Q_EMIT theOp->committed( theOp );
stop( theOp );
- emit studyModified( this );
+ Q_EMIT studyModified( this );
return true;
}
theOp->setState( SUIT_Operation::Suspended );
theOp->suspendOperation();
- emit theOp->suspended( theOp );
+ Q_EMIT theOp->suspended( theOp );
return true;
}
myOperations.removeAll( theOp );
myOperations.append( theOp );
- emit theOp->resumed( theOp );
+ Q_EMIT theOp->resumed( theOp );
return true;
}
theOp->stopOperation();
operationStopped( theOp );
- emit theOp->stopped( theOp );
+ Q_EMIT theOp->stopped( theOp );
if ( aResultOp )
resume( aResultOp );
virtual void restoreState(int savePoint);
-signals:
+Q_SIGNALS:
void studyModified( SUIT_Study* );
protected:
for ( int i = 0, n = myColumns.size(); i < n; i++ ) {
if ( myColumns[i].myName == name && myColumns[i].myAppropriate != appr ) {
myColumns[i].myAppropriate = appr;
- emit headerDataChanged( Qt::Horizontal, i, i );
+ Q_EMIT headerDataChanged( Qt::Horizontal, i, i );
break;
}
}
for ( int i = 0, n = myColumns.size(); i < n; i++ ) {
if ( myColumns[i].myName == name && myColumns[i].myHeaderFlags != flags ) {
myColumns[i].myHeaderFlags = flags;
- emit headerDataChanged( Qt::Horizontal, i, i );
+ Q_EMIT headerDataChanged( Qt::Horizontal, i, i );
break;
}
}
}
if ( !lst.isEmpty() ) {
QModelIndex idx = index( lst.first().row(), SUIT_DataObject::VisibilityId, lst.first().parent() );
- emit dataChanged( idx, idx );
+ Q_EMIT dataChanged( idx, idx );
}
}
}
*/
void SUIT_TreeModel::setVisibilityStateForAll( Qtx::VisibilityState state )
{
- foreach( QString id, myVisibilityMap.keys() )
+ Q_FOREACH( QString id, myVisibilityMap.keys() )
setVisibilityState( id, state );
}
//initialize();
reset();
- emit modelUpdated();
+ Q_EMIT modelUpdated();
}
/*!
// checked state
if ( obj->isCheckable( index.column() ) ) {
obj->setOn( value.toBool(), index.column() );
- emit( dataChanged( index, index ) );
+ Q_EMIT( dataChanged( index, index ) );
return true;
}
break;
case EditRole: {
QString val = value.toString();
if ( !val.isEmpty() && obj->setName(val) ) {
- emit( dataChanged( index, index ) );
+ Q_EMIT( dataChanged( index, index ) );
return true;
}
return false;
id = inf.myIds[0];
if( inf.myIds.contains( obj_group_id ) )
id = inf.myIds[obj_group_id];
- emit clicked(obj, id);
+ Q_EMIT clicked(obj, id);
}
/*!
treeItem( obj ),
SUIT_TreeModel::TreeSync( this ) );
}
- emit modelUpdated();
+ Q_EMIT modelUpdated();
}
/*!
- emit layoutChanged
*/
- emit layoutAboutToBeChanged();
+ Q_EMIT layoutAboutToBeChanged();
// Remember the QModelIndex that will change
QModelIndexList fromIndexes;
}
//changePersistentIndexList(fromIndexes, toIndexes); // Limitation: can lead to loss of selection
- emit dataChanged( toIndexes.first(), toIndexes.last() );
+ Q_EMIT dataChanged( toIndexes.first(), toIndexes.last() );
obj->setModified(false);
if ( emitLayoutChanged )
- emit layoutChanged();
+ Q_EMIT layoutChanged();
}
/*!
{
QModelIndex firstIdx = index( obj, 0 );
QModelIndex lastIdx = index( obj, columnCount() - 1 );
- emit dataChanged( firstIdx, lastIdx );
+ Q_EMIT dataChanged( firstIdx, lastIdx );
obj->setModified(false);
}
}
QDataStream stream( &encodedData, QIODevice::WriteOnly );
- foreach ( QModelIndex index, indexes ) {
+ Q_FOREACH ( QModelIndex index, indexes ) {
QString id = objectId( index );
// we have to check only 0 column in order to avoid repeating items in the drag object
// - QTreeView tries to drag indices for all visible columns
}
// emit signal
- emit dropped( objects, pobj, row, action );
+ Q_EMIT dropped( objects, pobj, row, action );
// return true if there's any to drop
return !objects.isEmpty();
virtual bool dropMimeData (const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent);
-public slots:
+public Q_SLOTS:
virtual void updateTree( const QModelIndex& );
virtual void updateTree( SUIT_DataObject* = 0 );
-signals:
+Q_SIGNALS:
void modelUpdated();
void clicked( SUIT_DataObject*, int );
void dropped( const QList<SUIT_DataObject*>&, SUIT_DataObject*, int, Qt::DropAction );
void updateItem( TreeItem*, bool emitLayoutChanged );
void removeItem( TreeItem* );
-private slots:
+private Q_SLOTS:
void onInserted( SUIT_DataObject*, SUIT_DataObject* );
void onRemoved( SUIT_DataObject*, SUIT_DataObject* );
void onModified( SUIT_DataObject* );
QAbstractItemDelegate* delegate() const;
-public slots:
+public Q_SLOTS:
virtual void updateTree( const QModelIndex& );
virtual void updateTree( SUIT_DataObject* = 0 );
void setSortingEnabled( bool );
-signals:
+Q_SIGNALS:
void modelUpdated();
void clicked( SUIT_DataObject*, int );
void dropped( const QList<SUIT_DataObject*>&, SUIT_DataObject*, int, Qt::DropAction );
//it is done automatically during creation of view
aView->setViewManager( this );
- emit viewCreated( aView );
+ Q_EMIT viewCreated( aView );
// Special treatment for the case when <aView> is the first one in this view manager
// -> call onWindowActivated() directly, because somebody may always want
if ( !view->testAttribute( Qt::WA_DeleteOnClose ) )
return;
- emit deleteView( view );
+ Q_EMIT deleteView( view );
removeView( view );
if ( view )
if ( myActiveView == theView )
myActiveView = 0;
if ( !myViews.count() )
- emit lastViewClosed( this );
+ Q_EMIT lastViewClosed( this );
}
/*!
/*!Emit on \a theEvent mouse pressed in \a theView.*/
void SUIT_ViewManager::onMousePressed(SUIT_ViewWindow* theView, QMouseEvent* theEvent)
{
- emit mousePress(theView, theEvent);
+ Q_EMIT mousePress(theView, theEvent);
}
/*!Emit activated for view \a view.
for (uint i = 0; i < aSize; i++) {
if (myViews[i] && myViews[i] == view) {
myActiveView = view;
- emit activated( this );
+ Q_EMIT activated( this );
return;
}
}
int getGlobalId() const;
-public slots:
+public Q_SLOTS:
void createView();
void closeAllViews();
-signals:
+Q_SIGNALS:
void lastViewClosed(SUIT_ViewManager*);
void tryCloseView(SUIT_ViewWindow*);
void deleteView(SUIT_ViewWindow*);
void keyRelease(SUIT_ViewWindow*, QKeyEvent*);
void activated(SUIT_ViewManager*);
-protected slots:
+protected Q_SLOTS:
void onWindowActivated(SUIT_ViewWindow*);
void onClosingView( SUIT_ViewWindow* );
void onMousePressed(SUIT_ViewWindow*, QMouseEvent* );
void onDeleteStudy();
-private slots:
+private Q_SLOTS:
void onContextMenuRequested( QContextMenuEvent* e );
protected:
void SUIT_ViewWindow::closeEvent( QCloseEvent* e )
{
e->ignore();
- emit tryClosing( this );
- if ( closable() ) emit closing( this );
+ Q_EMIT tryClosing( this );
+ if ( closable() ) Q_EMIT closing( this );
}
/*! Context menu requested for event \a e.
return;
if ( e->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( e );
+ Q_EMIT contextMenuRequested( e );
}
/*! Post events on dump view.
if ( alist.isEmpty() ) continue;
int idx = toolMgr()->index( toolMgr()->actionId( alist[0] ), tid );
if ( idx == -1 ) continue;
- foreach ( QAction* a, alist ) toolMgr()->remove( toolMgr()->actionId( a ), tid );
+ Q_FOREACH ( QAction* a, alist ) toolMgr()->remove( toolMgr()->actionId( a ), tid );
toolMgr()->insert( ma, tid, idx );
}
}
else {
QIntList tblist = toolMgr()->toolBarsIds();
QIntList alist = toolMgr()->idList();
- foreach( int aid, alist )
+ Q_FOREACH( int aid, alist )
{
QtxMultiAction* ma = qobject_cast<QtxMultiAction*>( toolMgr()->action( aid ) );
if ( !ma ) continue;
- foreach( int tid, tblist )
+ Q_FOREACH( int tid, tblist )
{
int idx = toolMgr()->index( aid, tid );
if ( idx >= 0 )
{
myMultiActions[ tid ].append( ma );
toolMgr()->remove( aid, tid );
- foreach( QAction* a, ma->actions() ) toolMgr()->insert( a, tid, idx++ );
+ Q_FOREACH( QAction* a, ma->actions() ) toolMgr()->insert( a, tid, idx++ );
}
}
}
*/
void SUIT_ViewWindow::emitViewModified()
{
- emit viewModified( this );
+ Q_EMIT viewModified( this );
}
/*!
if ( app ) {
SUIT_Desktop* d = app->desktop();
QList<SUIT_ViewWindow*> allViews = qFindChildren<SUIT_ViewWindow*>( d );
- foreach( SUIT_ViewWindow* vw, allViews ) {
+ Q_FOREACH( SUIT_ViewWindow* vw, allViews ) {
if ( !vw || vw == this ) continue; // skip invalid views and this one
SUIT_CameraProperties otherProps = vw->cameraProperties();
if ( otherProps.isCompatible( props ) ) {
if ( !d ) return;
QList<SUIT_ViewWindow*> allViews = qFindChildren<SUIT_ViewWindow*>( d );
- foreach( SUIT_ViewWindow* vw, allViews ) {
+ Q_FOREACH( SUIT_ViewWindow* vw, allViews ) {
if ( !vw->cameraProperties().isValid() )
continue; // omit views not supporting camera properties
if ( vw->getId() == id )
if ( isSync && id ) {
// remove all possible disconnections
- foreach( SUIT_ViewWindow* vw, otherViews ) {
+ Q_FOREACH( SUIT_ViewWindow* vw, otherViews ) {
// disconnect target view
vw->disconnect( SIGNAL( viewModified( SUIT_ViewWindow* ) ), viewWindow, SLOT( synchronize( SUIT_ViewWindow* ) ) );
viewWindow->disconnect( SIGNAL( viewModified( SUIT_ViewWindow* ) ), vw, SLOT( synchronize( SUIT_ViewWindow* ) ) );
virtual SUIT_CameraProperties cameraProperties();
-public slots:
+public Q_SLOTS:
virtual void onDumpView();
-signals:
+Q_SIGNALS:
void tryClosing( SUIT_ViewWindow* );
void closing( SUIT_ViewWindow* );
void mousePressed( SUIT_ViewWindow*, QMouseEvent* );
SUIT_Desktop* myDesktop;
SUIT_ViewManager* myManager;
-protected slots:
+protected Q_SLOTS:
void updateSyncViews();
void onSynchronizeView(bool);
virtual void synchronize( SUIT_ViewWindow* );
void setCurrentIndex( const int );
int currentIndex() const;
-signals:
+Q_SIGNALS:
void triggered( int );
protected:
virtual void Update();
-private slots:
+private Q_SLOTS:
virtual bool onApply();
private:
int
DestroyTimer() ;
- protected slots:
+ protected Q_SLOTS:
//! The slot connects to QTimer::timeout signal to invoke vtkCommand::TimerEvent
void
OnTimeOut();
QtxDoubleSpinBox* m_sbZcoeff;
QPushButton* m_bReset;
-protected slots:
+protected Q_SLOTS:
void onClickApply();
void onClickReset();
void onClickOk();
private:
virtual void keyPressEvent( QKeyEvent* );
-protected slots:
+protected Q_SLOTS:
void onStart();
void onClose();
void onHelp();
SVTK_RenderWindowInteractor
::onEmitSelectionChanged()
{
- return emit selectionChanged();
+ return Q_EMIT selectionChanged();
}
QVTK_RenderWindowInteractor::mouseMoveEvent(event);
if(GENERATE_SUIT_EVENTS)
- emit MouseMove( event );
+ Q_EMIT MouseMove( event );
}
QVTK_RenderWindowInteractor::mousePressEvent(event);
if(GENERATE_SUIT_EVENTS)
- emit MouseButtonPressed( event );
+ Q_EMIT MouseButtonPressed( event );
}
!( event->modifiers() & Qt::ShiftModifier ) ) {
QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
event->pos(), event->globalPos() );
- emit contextMenuRequested( &aEvent );
+ Q_EMIT contextMenuRequested( &aEvent );
}
if(GENERATE_SUIT_EVENTS)
- emit MouseButtonReleased( event );
+ Q_EMIT MouseButtonReleased( event );
}
QVTK_RenderWindowInteractor::mouseDoubleClickEvent(event);
if(GENERATE_SUIT_EVENTS)
- emit MouseDoubleClicked( event );
+ Q_EMIT MouseDoubleClicked( event );
}
GetDevice()->InvokeEvent(SVTK::ZoomOutEvent,NULL);
if(GENERATE_SUIT_EVENTS)
- emit WheelMoved( event );
+ Q_EMIT WheelMoved( event );
}
/*!
QVTK_RenderWindowInteractor::keyPressEvent(event);
if(GENERATE_SUIT_EVENTS)
- emit KeyPressed( event );
+ Q_EMIT KeyPressed( event );
}
/*!
QVTK_RenderWindowInteractor::keyReleaseEvent(event);
if(GENERATE_SUIT_EVENTS)
- emit KeyReleased( event );
+ Q_EMIT KeyReleased( event );
}
//! Get paint engine for the scene
virtual QPaintEngine* paintEngine() const;
- public slots:
+ public Q_SLOTS:
//! Need for initial contents display on Win32
virtual void show();
onEmitSelectionChanged();
public:
- signals:
+ Q_SIGNALS:
void MouseMove( QMouseEvent* );
void MouseButtonPressed( QMouseEvent* );
void MouseButtonReleased( QMouseEvent* );
void* clientdata,
void* calldata);
-protected slots:
+protected Q_SLOTS:
void onBBCenterChecked();
void onToOrigin();
void* clientdata,
void* calldata);
-protected slots:
+protected Q_SLOTS:
void onClickOk();
void onClickApply();
void onClickClose();
getRenderer();
//----------------------------------------------------------------------------
- public slots:
+ public Q_SLOTS:
void onSelectionChanged();
public:
- signals:
+ Q_SIGNALS:
void MouseMove( QMouseEvent* );
void MouseButtonPressed( QMouseEvent* );
void MouseButtonReleased( QMouseEvent* );
void SVTK_Viewer::onActorAdded(VTKViewer_Actor* theActor)
{
- emit actorAdded((SVTK_ViewWindow*)sender(), theActor);
+ Q_EMIT actorAdded((SVTK_ViewWindow*)sender(), theActor);
}
void SVTK_Viewer::onActorRemoved(VTKViewer_Actor* theActor)
{
- emit actorRemoved((SVTK_ViewWindow*)sender(), theActor);
+ Q_EMIT actorRemoved((SVTK_ViewWindow*)sender(), theActor);
}
//! See #SALOME_View::Repaint()
virtual void Repaint();
- signals:
+ Q_SIGNALS:
void actorAdded(SVTK_ViewWindow*, VTKViewer_Actor*);
void actorRemoved(SVTK_ViewWindow*, VTKViewer_Actor*);
-protected slots:
+protected Q_SLOTS:
void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
{
Q_OBJECT;
-public slots:
+public Q_SLOTS:
//! To invoke Qt #selectionChanged signal
void onSelectionChanged()
{
- emit selectionChanged();
+ Q_EMIT selectionChanged();
}
- signals:
+ Q_SIGNALS:
//! To declare signal on selection changed
void selectionChanged();
};
void* clientdata,
void* calldata);
-protected slots:
+protected Q_SLOTS:
void onProjectionModeChanged(int);
void onPositionModeChanged(int);
{
GetRenderer()->OnFrontView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnBackView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnTopView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnBottomView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnLeftView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnRightView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->onClockWiseView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->onAntiClockWiseView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnResetView();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->OnFitAll();
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
{
GetRenderer()->SetScale( theScale );
Repaint();
- emit transformed( this );
+ Q_EMIT transformed( this );
}
/*!
*/
void SVTK_ViewWindow::onKeyPressed(QKeyEvent* event)
{
- emit keyPressed( this, event );
+ Q_EMIT keyPressed( this, event );
}
/*!
*/
void SVTK_ViewWindow::onKeyReleased(QKeyEvent* event)
{
- emit keyReleased( this, event );
+ Q_EMIT keyReleased( this, event );
}
/*!
*/
void SVTK_ViewWindow::onMousePressed(QMouseEvent* event)
{
- emit mousePressed(this, event);
+ Q_EMIT mousePressed(this, event);
}
/*!
*/
void SVTK_ViewWindow::onMouseReleased(QMouseEvent* event)
{
- emit mouseReleased( this, event );
+ Q_EMIT mouseReleased( this, event );
}
/*!
*/
void SVTK_ViewWindow::onMouseMoving(QMouseEvent* event)
{
- emit mouseMoving( this, event );
+ Q_EMIT mouseMoving( this, event );
}
/*!
*/
void SVTK_ViewWindow::onMouseDoubleClicked( QMouseEvent* event )
{
- emit mouseDoubleClicked( this, event );
+ Q_EMIT mouseDoubleClicked( this, event );
}
/*!
GetRenderer()->AddActor(theActor, theIsAdjustActors);
if(theUpdate)
Repaint();
- emit actorAdded(theActor);
+ Q_EMIT actorAdded(theActor);
}
/*!
myKeyFreeInteractorStyle->FreeActors();
if(theUpdate)
Repaint();
- emit actorRemoved(theActor);
+ Q_EMIT actorRemoved(theActor);
}
QImage SVTK_ViewWindow::dumpViewContent()
aCamera->SetParallelProjection(anIsParallelMode);
GetInteractor()->GetDevice()->CreateTimer(VTKI_TIMER_FIRST);
- emit transformed( this );
+ Q_EMIT transformed( this );
}
void SVTK_ViewWindow::SetEventDispatcher(vtkObject* theDispatcher)
*/
void SVTK_ViewWindow::showEvent( QShowEvent * theEvent )
{
- emit Show( theEvent );
+ Q_EMIT Show( theEvent );
}
/*!
*/
void SVTK_ViewWindow::hideEvent( QHideEvent * theEvent )
{
- emit Hide( theEvent );
+ Q_EMIT Hide( theEvent );
}
/*!
virtual SUIT_CameraProperties cameraProperties();
- signals:
+ Q_SIGNALS:
void Show( QShowEvent * );
void Hide( QHideEvent * );
-public slots:
+public Q_SLOTS:
virtual void showEvent( QShowEvent * );
virtual void hideEvent( QHideEvent * );
virtual void onSelectionChanged();
void onPauseRecording();
void onStopRecording();
-signals:
+Q_SIGNALS:
void selectionChanged();
void actorAdded(VTKViewer_Actor*);
void actorRemoved(VTKViewer_Actor*);
void transformed(SVTK_ViewWindow*);
-public slots:
+public Q_SLOTS:
//! Redirect the request to #SVTK_Renderer::OnFrontView
virtual void onFrontView();
virtual void synchronize(SVTK_ViewWindow*);
-protected slots:
+protected Q_SLOTS:
void synchronize( SUIT_ViewWindow* );
void onKeyPressed(QKeyEvent* event);
void onKeyReleased(QKeyEvent* event);
QStringList aModules;
modules(aModules, false);
- foreach(QString aModile, aModules) {
+ Q_FOREACH(QString aModile, aModules) {
QString aModName = moduleName(aModile);
QString aSectionStr = resMgr->stringValue(aModName, "popupitems", QString());
if (!aSectionStr.isNull()) {
QStringList aSections = aSectionStr.split(':');
- foreach(QString aSection, aSections) {
+ Q_FOREACH(QString aSection, aSections) {
QString aTitle = resMgr->stringValue(aSection, "title", QString());
QString aId = resMgr->stringValue(aSection, "objectid", QString());
QString aSlot = resMgr->stringValue(aSection, "method", QString());
#ifndef DISABLE_PYCONSOLE
// emit signal to restore study from Python script
if ( myNoteBook ) {
- emit dumpedStudyClosed( myNoteBook->getDumpedStudyScript(),
+ Q_EMIT dumpedStudyClosed( myNoteBook->getDumpedStudyScript(),
myNoteBook->getDumpedStudyName(),
myNoteBook->isDumpedStudySaved() );
}
virtual bool renameAllowed( const QString& ) const;
virtual bool renameObject( const QString&, const QString& );
-public slots:
+public Q_SLOTS:
virtual void onLoadDoc();
virtual void onNewWithScript();
virtual bool onLoadDoc( const QString& );
virtual void onCheckIn();
virtual void onLocalCheckIn();
-protected slots:
+protected Q_SLOTS:
void onStudyCreated( SUIT_Study* );
void onStudyOpened( SUIT_Study* );
virtual void afterCloseDoc();
-private slots:
+private Q_SLOTS:
void onDeleteInvalidReferences();
void onDblClick( SUIT_DataObject* );
void onProperties();
QMap<QString, QAction*> myExtActions; // Map <AttributeUserID, QAction>
bool myIsSiman; // application corresponds to the siman study flag
-signals:
+Q_SIGNALS:
void dumpedStudyClosed( const QString& theDumpScript,
const QString& theStudyName,
bool theIsStudySaved );
void setShowTipOnValidate( const bool );
bool isShowTipOnValidate() const;
-signals:
+Q_SIGNALS:
void textChanged( const QString& );
protected:
virtual void keyPressEvent( QKeyEvent* );
virtual void showEvent( QShowEvent* );
-protected slots:
+protected Q_SLOTS:
void onEditingFinished();
void onTextChanged( const QString& );
SalomeApp_Application::ModuleShortInfoList versions = SalomeApp_Application::getVersionInfo();
QString version;
SalomeApp_Application::ModuleShortInfo version_info;
- foreach ( version_info, versions ) {
+ Q_FOREACH ( version_info, versions ) {
if ( SalomeApp_Application::moduleName( version_info.name ) == myComponentName.c_str() ) {
version = version_info.version;
break;
void setShowTipOnValidate( const bool );
bool isShowTipOnValidate() const;
-signals:
+Q_SIGNALS:
void textChanged( const QString& );
protected:
virtual void keyPressEvent( QKeyEvent* );
virtual void showEvent( QShowEvent* );
-protected slots:
+protected Q_SLOTS:
void onEditingFinished();
void onTextChanged( const QString& );
update( contentsRect() );//updateContents();
// connecting again selection changed SIGNAL
blockSignals(false);
- emit itemSelectionChanged();
+ Q_EMIT itemSelectionChanged();
}
/*!
update( contentsRect() );//updateContents();
// connecting again selection changed SIGNAL
blockSignals(false);
- emit itemSelectionChanged();
+ Q_EMIT itemSelectionChanged();
}
/*!
void SalomeApp_EditBox::keyPressEvent( QKeyEvent *e )
{
if ( e->key() == Qt::Key_Escape )
- emit escapePressed();
+ Q_EMIT escapePressed();
else
QLineEdit::keyPressEvent( e );
e->accept();
myApplyBtn->setEnabled(false);
if (myCancelBtn)
myCancelBtn->setEnabled(false);
- emit escapePressed();
+ Q_EMIT escapePressed();
}
/*!
myApplyBtn->setEnabled(false);
if (myCancelBtn)
myCancelBtn->setEnabled(false);
- emit returnPressed();
+ Q_EMIT returnPressed();
}
/*!
// enables/disables mouse events (excluding MouseMove)
void enableMouse(bool enable);
-protected slots:
+protected Q_SLOTS:
// called when selection changed in list
virtual void onSelectionChanged();
// called when user finishes in editing of item
protected:
void keyPressEvent(QKeyEvent* e);
-signals:
+Q_SIGNALS:
void escapePressed();
};
protected:
void keyPressEvent ( QKeyEvent * e);
-private slots:
+private Q_SLOTS:
void onComboActivated(const QString&);
void onTextChanged(const QString&);
void onApply();
void onCancel();
-signals:
+Q_SIGNALS:
void returnPressed();
void escapePressed();
QString selectedStudy();
-private slots:
+private Q_SLOTS:
void updateState();
private:
QList<NoteBook_TableRow*> myRows;
- public slots:
+ public Q_SLOTS:
void onItemChanged(QTableWidgetItem* theItem);
private:
bool isDumpedStudySaved() { return myIsDumpedStudySaved; }
void setIsDumpedStudySaved(bool isSaved) { myIsDumpedStudySaved = isSaved; }
- public slots:
+ public Q_SLOTS:
void onApply();
void onRemove();
void onUpdateStudy();
#ifndef DISABLE_PYCONSOLE
void SalomeApp_Study::onNoteBookVarUpdate( QString theVarName)
{
- emit notebookVarUpdated( theVarName );
+ Q_EMIT notebookVarUpdated( theVarName );
}
#endif
myStudyDS->attach(myObserver->_this(),true);
#endif
- emit created( this );
+ Q_EMIT created( this );
return aRet;
}
bool res = CAM_Study::openDocument( theFileName );
- emit opened( this );
+ Q_EMIT opened( this );
study->IsSaved(true);
bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
//rnv: to fix the "0051779: TC7.2.0: Save operation works incorrectly for study loaded from data server"
// mark study as "not saved" after call openDocument( ... ) method.
setIsSaved(false);
- emit opened( this );
+ Q_EMIT opened( this );
bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
if ( restore ) {
res = res && saveStudyData(theFileName);
if ( res )
- emit saved( this );
+ Q_EMIT saved( this );
return res;
}
res = res && saveStudyData(studyName());
if ( res )
- emit saved( this );
+ Q_EMIT saved( this );
return res;
}
void setStudyDS(const _PTR(Study)& s );
virtual CAM_ModuleObject* createModuleObject( LightApp_DataModel* theDataModel,
SUIT_DataObject* theParent ) const;
-protected slots:
+protected Q_SLOTS:
virtual void updateModelRoot( const CAM_DataModel* );
#ifndef DISABLE_PYCONSOLE
void onNoteBookVarUpdate( QString theVarName );
Observer_i* myObserver;
#ifndef DISABLE_PYCONSOLE
- signals:
+ Q_SIGNALS:
void notebookVarUpdated( QString theVarName );
#endif
};
bool isChanged() { return myIsChanged; }
-public slots:
+public Q_SLOTS:
void clickOnOk();
private:
QColor c = QColorDialog::getColor( lastColor, this );
if ( c.isValid() ) {
fromColor( lastColor = c );
- emit( changed() );
+ Q_EMIT( changed() );
}
}
*/
void Style_PrefDlg::PaletteEditor::onAuto()
{
- foreach( Btns btn, myButtons ) {
+ Q_FOREACH( Btns btn, myButtons ) {
btn[ QPalette::Inactive ]->setEnabled( !myAutoCheck->isChecked() );
btn[ QPalette::Disabled ]->setEnabled( !myAutoCheck->isChecked() );
}
- emit( changed() );
+ Q_EMIT( changed() );
}
/*!
item->setData( TypeRole, QVariant( Default ) );
myStylesList->addItem( item );
// global styles
- foreach ( QString sname, globalStyles ) {
+ Q_FOREACH ( QString sname, globalStyles ) {
item = new QListWidgetItem( sname );
item->setForeground( QColor( Qt::blue ) );
item->setData( TypeRole, QVariant( Global ) );
myStylesList->addItem( item );
}
// user styles
- foreach ( QString sname, userStyles ) {
+ Q_FOREACH ( QString sname, userStyles ) {
item = new QListWidgetItem( sname );
item->setData( TypeRole, QVariant( User ) );
item->setData( NameRole, QVariant( sname ) );
void Style_PrefDlg::onLinesType()
{
myLinesTransparency->setEnabled( myLinesCombo->itemData( myLinesCombo->currentIndex() ) != Style_Model::NoLines );
- emit( styleChanged() );
+ Q_EMIT( styleChanged() );
}
/*!
void Style_PrefDlg::onEffectChanged( QAbstractButton* rb )
{
if ( rb != myCurrentEffect )
- emit( styleChanged() );
+ Q_EMIT( styleChanged() );
myCurrentEffect = qobject_cast<QRadioButton*>( rb );
}
QString findUniqueName( const QString&, QListWidgetItem* = 0, bool = false );
-signals:
+Q_SIGNALS:
void styleChanged();
-private slots:
+private Q_SLOTS:
void onApply();
void onHelp();
static QString idToName( int );
QWidget* line();
-private slots:
+private Q_SLOTS:
void onQuick();
void onAuto();
-signals:
+Q_SIGNALS:
void changed();
private:
SubControl, const QWidget* = 0 ) const;
virtual QRect subElementRect( SubElement, const QStyleOption*, const QWidget* = 0 ) const;
-protected slots:
+protected Q_SLOTS:
QIcon standardIconImplementation( StandardPixmap, const QStyleOption* = 0,
const QWidget* = 0 ) const;
private:
QString getCompType();
QString getCompMultiStd();
-protected slots:
+protected Q_SLOTS:
void onBrowseBtnClicked();
void updateButtonState();
void onApply();
static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_ptr orb,
QWidget* parent = 0 );
-private slots:
+private Q_SLOTS:
void refresh();
void showDetails( QTreeWidgetItem*, int );
void refreshInterval();
protected:
void contextMenuEvent(QContextMenuEvent *event);
-public slots:
+public Q_SLOTS:
void updateActions();
-private slots:
+private Q_SLOTS:
void insertChild();
bool insertColumn(const QModelIndex &parent = QModelIndex());
void insertRow();
TreeModel * _dataTreeModel;
DataModel * _dataModel;
-public slots:
+public Q_SLOTS:
virtual void processItemList(QStringList itemNameIdList, int actionId);
};
: QAbstractItemModel(parent)
{
QVector<QVariant> rootData;
- foreach (QString header, headers)
+ Q_FOREACH (QString header, headers)
rootData << header;
// _MEM_ We have to specify a string identifier for each item so
bool result = item->setData(index.column(), value);
if (result)
- emit dataChanged(index, index);
+ Q_EMIT dataChanged(index, index);
return result;
}
bool result = _rootItem->setData(section, value);
if (result)
- emit headerDataChanged(orientation, section, section);
+ Q_EMIT headerDataChanged(orientation, section, section);
return result;
}
TreeObserver();
void observe(TreeView * treeView);
-public slots:
+public Q_SLOTS:
/* These slots should be implemented in a specialized version of
the TreeObserver to process signals emitted from the TreeView */
virtual void processItemList(QStringList itemNameIdList, int actionId);
LOG("TreeView::processMenuAction: signal emitted:\n"<<
"item list: "<<nameIdList<<"\n"<<
"action id: "<<actionId);
- emit itemListToProcess(nameIdList, actionId);
+ Q_EMIT itemListToProcess(nameIdList, actionId);
LOG("processMenuAction: END");
}
// ---
-private slots:
+private Q_SLOTS:
void processMenuAction(QAction * actionSelected);
-signals:
+Q_SIGNALS:
void itemListToProcess(QStringList itemNameIdList, int actionId);
};
protected:
void keyPressEvent( QKeyEvent* );
-private slots:
+private Q_SLOTS:
void onHelp();
private:
void init();
QPixmap markerFromData( const VTK::MarkerData& );
-private slots:
+private Q_SLOTS:
void onTypeChanged( int );
private:
/*!Emit mouse move event.*/
void VTKViewer_RenderWindow::mouseMoveEvent(QMouseEvent* event)
{
- emit MouseMove(event) ;
+ Q_EMIT MouseMove(event) ;
}
/*!Emit mouse button press event.*/
void VTKViewer_RenderWindow::mousePressEvent(QMouseEvent* event)
{
- emit MouseButtonPressed( event );
+ Q_EMIT MouseButtonPressed( event );
}
/*!Emit mouse button release event.*/
void VTKViewer_RenderWindow::mouseReleaseEvent( QMouseEvent *event )
{
- emit MouseButtonReleased( event );
+ Q_EMIT MouseButtonReleased( event );
}
/*!Emit mouse button double click event.*/
void VTKViewer_RenderWindow::mouseDoubleClickEvent( QMouseEvent* event )
{
- emit MouseDoubleClicked( event );
+ Q_EMIT MouseDoubleClicked( event );
}
/*!Emit key pressed event.*/
void VTKViewer_RenderWindow::keyPressEvent (QKeyEvent* event)
{
- emit KeyPressed(event) ;
+ Q_EMIT KeyPressed(event) ;
}
/*!Emit key release event.*/
void VTKViewer_RenderWindow::keyReleaseEvent (QKeyEvent * event)
{
- emit KeyReleased(event) ;
+ Q_EMIT KeyReleased(event) ;
}
/*!Emit wheel move event.*/
void VTKViewer_RenderWindow::wheelEvent(QWheelEvent* event)
{
- emit WheelMoved(event) ;
+ Q_EMIT WheelMoved(event) ;
}
/*!Reaction on change background color.*/
void VTKViewer_RenderWindow::contextMenuEvent ( QContextMenuEvent * e )
{
if ( e->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( e );
+ Q_EMIT contextMenuRequested( e );
}
virtual void onChangeBackgroundColor();
virtual void contextMenuEvent( QContextMenuEvent * e );
- signals:
+ Q_SIGNALS:
/*!On mouse move signal.*/
void MouseMove( QMouseEvent* );
/*!On mouse button pressed signal.*/
}
((vtkInteractorStyle*)this->InteractorStyle)->OnTimer() ;
- emit RenderWindowModified() ;
+ Q_EMIT RenderWindowModified() ;
}
/*!Emit render window modified on mouse move,\n
}
myInteractorStyle->OnMouseMove(0, 0, event->x(), event->y()/*this->Size[1] - event->y() - 1*/) ;
if (myInteractorStyle->needsRedrawing() )
- emit RenderWindowModified() ;
+ Q_EMIT RenderWindowModified() ;
}
/*!Reaction on left button pressed.\n
{
QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
event->pos(), event->globalPos() );
- emit contextMenuRequested( &aEvent );
+ Q_EMIT contextMenuRequested( &aEvent );
}
}
ForEach<VTKViewer_Actor>(theCollection,
TSetFunction<VTKViewer_Actor,int>
(&VTKViewer_Actor::setDisplayMode,0));
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
/*!Change all actors from \a theCollection to surface and
ForEach<VTKViewer_Actor>(theCollection,
TSetFunction<VTKViewer_Actor,int>
(&VTKViewer_Actor::setDisplayMode,1));
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
/*!Change all actors from \a theCollection to surface with edges and
ForEach<VTKViewer_Actor>(theCollection,
TSetFunction<VTKViewer_Actor,int>
(&VTKViewer_Actor::setDisplayMode,3));
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
/*!Gets renderer.*/
ActorCollectionCopy aCopy(GetRenderer()->GetActors());
ForEach<VTKViewer_Actor>(aCopy.GetActors(),TSetVisibility<VTKViewer_Actor>(true));
- emit RenderWindowModified() ;
+ Q_EMIT RenderWindowModified() ;
}
/*!Do nothing*/
{
GetRenderer()->RemoveViewProp( SActor );
if ( updateViewer )
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
}
}
if ( updateViewer )
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
}
theActor->SetVisibility(true);
if(update)
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
/*!
aRen->ResetCamera();
- emit RenderWindowModified();
+ Q_EMIT RenderWindowModified();
}
/*!Unhighlight all selection actors.*/
bool VTKViewer_RenderWindowInteractor::unHighlightAll(){
unHighlightSubSelection();
- emit RenderWindowModified() ;
+ Q_EMIT RenderWindowModified() ;
return false;
}
if(update){
this->RenderWindow->Render();
- emit RenderWindowModified() ;
+ Q_EMIT RenderWindowModified() ;
}
return false;
/*! User for switching to stereo mode.*/
int PositionBeforeStereo[2];
- public slots:
+ public Q_SLOTS:
void MouseMove(QMouseEvent *event) ;
void LeftButtonPressed(const QMouseEvent *event) ;
void LeftButtonReleased(const QMouseEvent *event) ;
void ButtonReleased(const QMouseEvent *event) ;
void KeyPressed(QKeyEvent *event) ;
- private slots:
+ private Q_SLOTS:
void TimerFunc() ;
-signals:
+Q_SIGNALS:
void RenderWindowModified() ;
void contextMenuRequested( QContextMenuEvent *e );
Qtx::BackgroundData background() const;
void setBackground( const Qtx::BackgroundData& );
-signals:
+Q_SIGNALS:
void selectionChanged();
-protected slots:
+protected Q_SLOTS:
void onMousePress( SUIT_ViewWindow*, QMouseEvent* );
void onMouseMove( SUIT_ViewWindow*, QMouseEvent* );
void onMouseRelease( SUIT_ViewWindow*, QMouseEvent* );
/*!Emit key pressed.*/
void VTKViewer_ViewWindow::onKeyPressed(QKeyEvent* event)
{
- emit keyPressed( this, event );
+ Q_EMIT keyPressed( this, event );
}
/*!Emit key released.*/
void VTKViewer_ViewWindow::onKeyReleased(QKeyEvent* event)
{
- emit keyReleased( this, event );
+ Q_EMIT keyReleased( this, event );
}
/*!Emit key pressed.*/
void VTKViewer_ViewWindow::onMousePressed(QMouseEvent* event)
{
- emit mousePressed(this, event);
+ Q_EMIT mousePressed(this, event);
}
/*!Emit mouse released.*/
void VTKViewer_ViewWindow::onMouseReleased(QMouseEvent* event)
{
- emit mouseReleased( this, event );
+ Q_EMIT mouseReleased( this, event );
}
/*!Emit mouse moving.*/
void VTKViewer_ViewWindow::onMouseMoving(QMouseEvent* event)
{
- emit mouseMoving( this, event );
+ Q_EMIT mouseMoving( this, event );
}
/*!Emit mouse double clicked.*/
void VTKViewer_ViewWindow::onMouseDoubleClicked( QMouseEvent* event )
{
- emit mouseDoubleClicked( this, event );
+ Q_EMIT mouseDoubleClicked( this, event );
}
/*!Insert actor to renderer and transformation filter.
virtual QString getVisualParameters();
virtual void setVisualParameters( const QString& parameters );
-public slots:
+public Q_SLOTS:
void onFrontView();
void onBackView();
void onTopView();
protected:
QImage dumpView();
-protected slots:
+protected Q_SLOTS:
void onKeyPressed(QKeyEvent* event);
void onKeyReleased(QKeyEvent* event);
void onMousePressed(QMouseEvent* event);
virtual void Update();
-protected slots:
+protected Q_SLOTS:
virtual void onOk();
virtual bool onApply();
virtual void onClose();
~ViewerTools_DialogBase();
-protected slots:
+protected Q_SLOTS:
void onParentShow();
void onParentHide();
virtual void done( int );
protected:
virtual void InitializeFamilies() = 0;
-protected slots:
+protected Q_SLOTS:
void onColor();
protected:
QFrame * getPanel();
QDialogButtonBox * getButtonBox();
- protected slots:
+ protected Q_SLOTS:
void accept();
//void reject();
public:
__CLASSNAME__(QDialog *parent = 0);
- protected slots:
+ protected Q_SLOTS:
void accept();
//void reject();