#include <vtkProcessModule.h>
#include <vtkPVSession.h>
#include <vtkPVProgressHandler.h>
-#include <vtkOutputWindow.h>
#include <vtkEventQtSlotConnect.h>
#include <vtkNew.h>
#include <vtkSMProxy.h>
// Initialize ParaView client and associated behaviors
// and connect to externally launched pvserver
- PVViewer_Core::ParaviewInitApp(aDesktop, anApp->logWindow());
+ PVViewer_Core::ParaviewInitApp(aDesktop);
myGuiElements = PVViewer_GUIElements::GetInstance(aDesktop);
// [ABN]: careful with the order of the GUI element creation, the loading of the configuration
PVViewer_ViewManager* viewMgr =
dynamic_cast<PVViewer_ViewManager*>( anApp->getViewManager( PVViewer_Viewer::Type(), false ) );
if ( !viewMgr ) {
- viewMgr = new PVViewer_ViewManager( anApp->activeStudy(), anApp->desktop(), anApp->logWindow() );
+ viewMgr = new PVViewer_ViewManager( anApp->activeStudy(), anApp->desktop() );
anApp->addViewManager( viewMgr );
connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
anApp, SLOT( onCloseView( SUIT_ViewManager* ) ) );
{
QApplication::restoreOverrideCursor();
}
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-/*!
- \brief Handler method for the output of messages.
-*/
-static void ParavisMessageOutput(QtMsgType type, const char *msg)
-{
- switch(type)
- {
- case QtDebugMsg:
- vtkOutputWindow::GetInstance()->DisplayText(msg);
- break;
- case QtWarningMsg:
- vtkOutputWindow::GetInstance()->DisplayErrorText(msg);
- break;
- case QtCriticalMsg:
- vtkOutputWindow::GetInstance()->DisplayErrorText(msg);
- break;
- case QtFatalMsg:
- vtkOutputWindow::GetInstance()->DisplayErrorText(msg);
- break;
- }
-}
-#else
-/*!
- \brief Handler method for the output of messages.
-*/
-static void ParavisMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
-{
- switch(type)
- {
- case QtDebugMsg:
- vtkOutputWindow::GetInstance()->DisplayText(msg.toLatin1().constData());
- break;
- case QtWarningMsg:
- vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
- break;
- case QtCriticalMsg:
- vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
- break;
- case QtFatalMsg:
- vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
- break;
- }
-}
-#endif
+
/*!
\brief Activate module.
\param study current study
*/
bool PVGUI_Module::activateModule( SUIT_Study* study )
{
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- myOldMsgHandler = qInstallMsgHandler(ParavisMessageOutput);
-#else
- myOldMsgHandler = qInstallMessageHandler(ParavisMessageOutput);
-#endif
SUIT_ExceptionHandler::addCleanUpRoutine( paravisCleanUp );
storeCommonWindowsState();
registerAction(TimerLogId, anAction);
new pqTimerLogReaction(anAction << pqSetName("actionToolsTimerLog"));
- // Output Window
- anAction = new QAction(tr("MEN_OUTPUT_WINDOW"), this);
- anAction->setToolTip(tr("TOP_OUTPUT_WINDOW"));
- anAction->setStatusTip(tr("STB_OUTPUT_WINDOW"));
- registerAction(OutputWindowId, anAction);
- anAction << pqSetName("actionToolsOutputWindow");
- connect(anAction, SIGNAL(triggered()), pqApplicationCore::instance(), SLOT(showOutputWindow()));
-
// Python Shell
anAction = new QAction(tr("MEN_PYTHON_SHELL"), this);
anAction->setToolTip(tr("TOP_PYTHON_SHELL"));
createMenu( separator(), aToolsMnu );
createMenu( TimerLogId, aToolsMnu );
- createMenu( OutputWindowId, aToolsMnu );
createMenu( separator(), aToolsMnu );
createMenu( PythonShellId, aToolsMnu );