#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
+#include <qlabel.h>
+#include <qfont.h>
#ifdef WIN32
#include <windows.h>
SUIT_MessageBox::error1( 0, tr( "Error" ), tr( "Can not load modules configuration file " ), tr( "Ok" ) );
}
-void CAM_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup )
+void CAM_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
{
// to do : add common items for popup menu ( if they are exist )
if ( activeModule() )
- activeModule()->contextMenuPopup( type, thePopup );
+ activeModule()->contextMenuPopup( type, thePopup, title );
}
virtual bool activateModule( const QString& );
- virtual void contextMenuPopup( const QString&, QPopupMenu* );
+ virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
QString moduleName( const QString& ) const;
QString moduleTitle( const QString& ) const;
CAM_DataModel* dataModel() const;
CAM_Application* application() const;
- virtual void contextMenuPopup( const QString&, QPopupMenu* ) {};
+ virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& title ) {};
virtual void updateCommandsStatus() {};
public slots:
Context popup menu request.
Called when user activates popup menu in some window (view, object browser, etc).
*/
-void SALOME_PYQT_Module::contextMenuPopup( const QString& theContext, QPopupMenu* thePopupMenu )
+void SALOME_PYQT_Module::contextMenuPopup( const QString& theContext, QPopupMenu* thePopupMenu, QString& /*title*/ )
{
MESSAGE( "SALOME_PYQT_Module::contextMenuPopup : " << theContext.latin1() );
// perform synchronous request to Python event dispatcher
void viewManagers( QStringList& ) const;
/* context popup menu request */
- void contextMenuPopup( const QString&, QPopupMenu* );
+ void contextMenuPopup( const QString&, QPopupMenu*, QString& );
protected:
/* data model creation */
#include <QtxDockAction.h>
#include <QtxActionMenuMgr.h>
#include <QtxActionToolMgr.h>
+#include <QtxPopupMenu.h>
#include <qmenubar.h>
#include <qtoolbar.h>
void STD_Application::onConnectPopupRequest( SUIT_PopupClient* client, QContextMenuEvent* e )
{
- QPopupMenu* popup = new QPopupMenu();
+ QtxPopupMenu* popup = new QtxPopupMenu();
// fill popup by own items
- contextMenuPopup( client->popupClientType(), popup );
+ QString title;
+ contextMenuPopup( client->popupClientType(), popup, title );
+ popup->setTitleText( title );
popup->insertSeparator();
// add items from popup client
virtual void start();
- virtual void contextMenuPopup( const QString&, QPopupMenu* ) {}
+ virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& ) {}
signals:
void viewManagerAdded( SUIT_ViewManager* );
//=======================================================================
void SalomeApp_Application::onHelpAbout()
{
- //QAD_MessageBox::info1( myDesktop, tr( "ABOUT" ), tr( "APP_NAME_LONG" ).arg( APP_VERSION ), tr( "BUT_OK" ) );
-
QMessageBox aDlg( desktop(), "AboutDlg" );
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QFontMetrics m( aDlg.font() );
QImage anImage = aPixmap.convertToImage();
- int w = m.height() * 3;
+ int w = m.height() * 5;
anImage = anImage.scale( w, w );
aPixmap.convertFromImage( anImage );
{
}
+void SalomeApp_Application::afterCloseDoc()
+{
+ updateWindows();
+
+ CAM_Application::afterCloseDoc();
+}
+
CORBA::ORB_var SalomeApp_Application::orb()
{
ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
getApp()->objectBrowser()->updateTree( root );
}
-void SalomeApp_Module::contextMenuPopup( const QString& client, QPopupMenu* menu )
+void SalomeApp_Module::contextMenuPopup( const QString& client, QPopupMenu* menu, QString& /*title*/ )
{
SalomeApp_Selection* sel = createSelection();
sel->init( client, getApp()->selectionMgr() );
virtual void viewManagers( QStringList& ) const;
virtual QString engineIOR() const;
- virtual void contextMenuPopup( const QString&, QPopupMenu* );
+ virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
// Convenient shortcuts
SalomeApp_Application* getApp() const;
emit closed( this );
// close SALOMEDS document
- _PTR(Study) st = studyDS();
- if ( st.get() )
+ _PTR(Study) studyPtr = studyDS();
+ if ( studyPtr.get() )
{
- SalomeApp_Application::studyMgr()->Close( st );
+ SalomeApp_Application::studyMgr()->Close( studyPtr );
SALOMEDSClient_Study* aStudy = 0;
setStudyDS( _PTR(Study)(aStudy) );
}