27 #ifndef LIGHTAPP_APPLICATION_H
28 #define LIGHTAPP_APPLICATION_H
32 #endif // _MSC_VER > 1000
40 #include <QStringList>
43 #ifndef DISABLE_PYCONSOLE
44 class PyConsole_Console;
47 class LightApp_WidgetContainer;
65 #pragma warning( disable:4251 )
78 #ifndef DISABLE_PYCONSOLE
85 enum { MenuWindowId = 6 };
91 NewQxSceneViewId, NewGraphicsViewId, NewPVViewId, NewPyViewerId,
StyleId, FullScreenId,
95 enum { NewStudyId = 1, OpenStudyId };
113 #ifndef DISABLE_PYCONSOLE
114 PyConsole_Console* pythonConsole(
const bool force =
false);
117 virtual void updateObjectBrowser(
const bool =
true );
123 virtual QString
getFileName(
bool open,
const QString& initial,
const QString& filters,
124 const QString& caption,
QWidget* parent );
125 virtual QString
getDirectory(
const QString& initial,
const QString& caption,
QWidget* parent );
126 virtual QStringList getOpenFileNames(
const QString& initial,
const QString& filters,
127 const QString& caption,
QWidget* parent );
129 void updateActions();
134 virtual SUIT_ViewManager* createViewManager(
const QString& vmType,
bool detached =
false );
138 QWidget* getWindow(
const int,
const int = -1 );
139 QWidget* dockWindow(
const int )
const;
140 void removeDockWindow(
const int );
141 void insertDockWindow(
const int,
QWidget* );
142 void placeDockWindow(
const int, Qt::DockWidgetArea );
144 virtual void start();
155 void setDefaultStudyName(
const QString& theName );
157 static int studyId();
159 virtual bool event(
QEvent* );
166 QStringList viewManagersTypes()
const;
169 virtual void clearKnownViewManagers();
171 virtual QString browseObjects(
const QStringList& theEntryList,
172 const bool theIsApplyAndClose =
true,
173 const bool theIsOptimizedBrowsing =
false );
177 virtual bool renameAllowed(
const QString& )
const;
178 virtual bool renameObject(
const QString&,
const QString& );
180 void emitOperationFinished(
const QString&,
const QString&,
const QStringList& );
185 virtual bool checkExistingDoc();
187 #ifndef DISABLE_PYCONSOLE
195 void preferenceChanged(
const QString&,
const QString&,
const QString& );
196 void preferenceResetToDefaults();
197 void operationFinished(
const QString&,
const QString&,
const QStringList& );
200 virtual void onHelpContentsModule();
201 virtual void onHelpContextModule(
const QString&,
const QString&,
const QString& = QString() );
206 virtual bool onOpenDoc(
const QString& );
209 virtual void onSelectionChanged();
210 virtual void onDockWindowVisibilityChanged(
bool );
214 virtual void createActionForViewer(
const int id,
216 const QString& suffix,
219 virtual QWidget* createWindow(
const int );
220 virtual void defaultWindows( QMap<int, int>& )
const;
221 void defaultViewManagers( QStringList& )
const;
233 virtual void preferencesChanged(
const QString&,
const QString& );
238 virtual QMap<int, QString> activateModuleActions()
const;
239 virtual void moduleActionSelected(
const int );
241 #ifndef DISABLE_PYCONSOLE
251 void onModuleActivation(
const QString& );
259 void onWCDestroyed(
QObject* );
261 void onMRUActivated(
const QString& );
263 void onStylePreferences();
266 virtual void onDesktopMessage(
const QString& );
272 void onPreferences();
273 void onPreferenceChanged( QString&, QString&, QString& );
274 void onRenameWindow();
275 void onCloseWindow();
276 void onCloseAllWindow();
277 void onGroupAllWindow();
282 void updateWindows();
283 void updateViewManagers();
284 void updateModuleActions();
285 void removeModuleAction(
const QString& );
287 void loadDockWindowsState();
288 void saveDockWindowsState();
294 void updatePreference(
const QString&,
const QString&,
const QString& );
296 QString defaultModule()
const;
297 virtual void currentWindows( QMap<int, int>& )
const;
298 void currentViewManagers( QStringList& )
const;
299 void moduleIconNames( QMap<QString, QString>& )
const;
301 bool isLibExists(
const QString& )
const;
304 QByteArray dockWindowsState(
const QMap<QString, bool>&,
const QMap<QString, bool>& )
const;
305 void dockWindowsState(
const QByteArray&, QMap<QString, bool>&, QMap<QString, bool>& )
const;
308 virtual bool openAction(
const int,
const QString& );
310 void showPreferences(
const QString& = QString() );
313 void emptyPreferences(
const QString& );
316 QByteArray processState(QByteArray& input,
317 const bool processWin,
318 const bool processTb,
319 const bool isRestoring,
320 QByteArray defaultState = QByteArray());
325 typedef QMap<QString, QByteArray>
WinVis;
349 #pragma warning( default:4251 )