55 #include "QtBaseViewer.hh" 56 #include "QtGLGraphicsScene.hh" 57 #include "QtGLGraphicsView.hh" 59 #include <QApplication> 62 #include <QFileDialog> 87 qApp->processEvents();
95 QString fname = fi.path() + QDir::separator() +fi.baseName() +
"." + QString::number(
snapshotCounter_).rightJustified(7,
'0') +
".";
99 if (fi.completeSuffix() ==
"ppm")
104 bool rval=
snapshot_->save(fname,format.toUpper().toLatin1());
107 assert(statusbar_!=0);
110 statusbar_->showMessage(QString(
"snapshot: ")+fname,5000);
111 if ( action_[
"SnapshotSavesView"]->isChecked() )
114 QFile f(fname+
".view"); f.open(QIODevice::WriteOnly|QIODevice::Truncate);
115 QTextStream sf(&f); sf << view; f.close();
120 statusbar_->showMessage(QString(
"could not save snapshot to ")+fname);
142 fname.replace(
'%',
'$');
143 fname = QFileDialog::getSaveFileName ( 0,
"Save snapshot name" );
144 if (!fname.isEmpty())
146 fname.replace(
'$',
'%');
149 assert(statusbar_!=0);
150 QString msg=
"next snapshot: ";
151 statusbar_->showMessage(msg);
Namespace providing different geometric functions concerning angles.
unsigned int glWidth() const
get width of QGLWidget
void actionSnapshotSavesView()
void actionSnapshotName()
void encodeView(QString &_view)
convert current view to text representation
virtual void snapshotBaseFileName(const QString &_fname)
void copyToImage(QImage &_image, GLenum _buffer=GL_BACK)
copy current framebuffer to an QImage
virtual void makeCurrent()
Makes this widget the current widget for OpenGL operations.
virtual void paintGL()
draw the scene. Triggered by updateGL().
unsigned int glHeight() const
get height of QGLWidget