18 #ifndef MILXQTSUBWINDOW_H 19 #define MILXQTSUBWINDOW_H 21 #include <QtGui/QtGui> 23 #include <QVTKWidget.h> 24 #include <vtkSmartPointer.h> 25 #include <vtkPointPicker.h> 28 #include "milxQtConsole.h" 62 void setName(
const QString filename);
82 return QFileInfo(name).fileName();
90 return QFileInfo(name).baseName();
100 return prefix + QFileInfo(name).fileName();
117 actionsToAdd.append(act);
125 actionsToAppend.append(act);
133 addMenuToContextMenu(newMenu);
141 extActionsToAdd.append(act);
149 menusToAdd.append(newMenu);
157 menusToAppend.append(newMenu);
164 virtual void copyToContextMenu(QMenu *copyMenu);
172 verboseMode = verbose;
180 deletableOnClose = delOnClose;
181 setAttribute(Qt::WA_DeleteOnClose, deletableOnClose);
189 return deletableOnClose;
197 consoleAssigned =
true;
206 inline void consumeVTKEvent(vtkObject * obj,
unsigned long,
void * client_data,
void *, vtkCommand * command)
208 command->AbortFlagOn();
215 qApp->processEvents();
223 void closing(QWidget *win);
228 void nameChanged(
const QString newName);
233 void working(
int value);
238 void done(
int value);
264 void createConnections();
269 void closeEvent(QCloseEvent *clEvent);
274 void printError(QString msg);
279 void printWarning(QString msg);
284 void printDebug(QString msg);
289 void printInfo(QString msg);
295 #endif // MILXQTSUBWINDOW_H void addToContextMenu(QMenu *newMenu)
Adds the menu to the context menu. Connections are assumed to be made before hand.
QList< QAction * > extActionsToAdd
Extension actions to add.
This file defines all the defines, aliases and frequently used functions and variables.
void updateQtEvents()
Update the Qt events, used to keep UI responsive.
virtual QString strippedNamePrefix()
Returns the stripped (path removed) name of the data with "Generic" prefix.
void setNamePrefix(const QString newPrefix)
Sets the prefix of the name of the data provided.
QMenu * contextMenu
Context Menu.
QString strippedName()
Returns the stripped (path removed) name of the data.
void setVerboseMode(bool verbose)
Verbose mode for message output.
This class represents the MILX Qt Window Display object using QVTK.
void setDeletableOnClose(bool delOnClose)
Set if the window deletable on close. Default is true.
QList< QMenu * > menusToAdd
Context Menu's to add.
bool consoleAssigned
Console assigned for output?
QString prefix
Prefix of the data.
void addToContextMenu(QAction *act)
Adds (prepends) the action to the context menu. Connections are assumed to be made before hand...
void appendToContextMenu(QAction *act)
Adds (appends) the action to the context menu. Connections are assumed to be made before hand...
void setConsole(milxQtConsole *con)
Set the console for log output.
void addExtensionAction(QAction *act)
Adds (in extension section) the action as an extension action. Connections are assumed to be made bef...
void appendMenuToContextMenu(QMenu *newMenu)
Adds (appends) the menu to the context menu. Connections are assumed to be made before hand...
#define MILXQT_EXPORT
Define Windows DLL importing.
bool deletableOnClose
Delete on close allowed? Allowed by default.
bool verboseMode
Verbose message output mode.
QList< QAction * > actionsToAppend
Context actions to append.
QString getName()
Returns the name of the data.
bool isDeletableOnClose()
Is the window deletable on close?
QList< QAction * > actionsToAdd
Context actions to add.
QString strippedBaseName()
Returns the stripped (path removed) base (no suffix) name of the data.
void addMenuToContextMenu(QMenu *newMenu)
Adds (prepends) the menu to the context menu. Connections are assumed to be made before hand...
milxQtConsole * console
Console for log outputs.
A console (tabbed) widget class for displaying information such as logs, terminals and consoles...
void consumeVTKEvent(vtkObject *obj, unsigned long, void *client_data, void *, vtkCommand *command)
Consume the event so that VTK interactor style doesn't get it. Safeguard for if remove observer direc...
QList< QMenu * > menusToAppend
Context Menu's to append.
QString name
Name of the data.