18 #include "milxQtWindow.h" 20 #include <QFileDialog> 22 #include <vtkRenderWindow.h> 55 QString newName = QInputDialog::getText(
this, tr(
"Rename Data"), tr(
"New Name: "), QLineEdit::Normal,
name, &ok);
63 QList<QAction *> actionsInMenu = copyMenu->actions();
64 QMenu *newMenu =
new QMenu(
this);
66 newMenu->setTitle(copyMenu->title());
67 foreach(QAction *action, actionsInMenu)
69 QAction *newAction =
new QAction(action->parent());
70 newAction->setText(action->text());
71 newAction->setCheckable(action->isCheckable());
72 newAction->setChecked(action->isChecked());
74 newMenu->addAction(newAction);
100 cerr <<
"ERROR: " << msg.toStdString() << endl;
111 cerr <<
"Warning: " << msg.toStdString() << endl;
122 cerr <<
"Debug: " << msg.toStdString() << endl;
133 cerr << msg.toStdString() << endl;
void printWarning(QString msg)
Warning message wrapper for console.
void printError(QString msg)
Error message wrapper for console.
milxQtWindow(QWidget *theParent=0)
The standard constructor.
void setName(const QString filename)
Set the name of the data.
void createConnections()
Create the connections for context menu etc.
virtual ~milxQtWindow()
The standard destructor.
virtual QString strippedNamePrefix()
Returns the stripped (path removed) name of the data with "Generic" prefix.
void printDebug(QString msg)
Debug message wrapper for console.
void nameChanged(const QString newName)
Send signal that the data has been renamed.
virtual void copyToContextMenu(QMenu *copyMenu)
Copies the menu, by duplicating the entries, to the context menu. Connections are assumed to be made ...
bool consoleAssigned
Console assigned for output?
QString prefix
Prefix of the data.
void printDebug(QString msg)
Debug message wrapper for console.
void addToContextMenu(QAction *act)
Adds (prepends) the action to the context menu. Connections are assumed to be made before hand...
void printError(QString msg)
Error message wrapper for console.
void closing(QWidget *win)
Send signal that the window is closing.
bool deletableOnClose
Delete on close allowed? Allowed by default.
bool verboseMode
Verbose message output mode.
void closeEvent(QCloseEvent *clEvent)
When closing, execute this member.
void rename()
Renames the data.
void printWarning(QString msg)
Warning message wrapper for console.
milxQtConsole * console
Console for log outputs.
void printInfo(QString msg)
Info message wrapper for console.
void printInfo(QString msg)
Info message wrapper for console.
QString name
Name of the data.