Commit 08a35a22 authored by Jan Möbius's avatar Jan Möbius

Framerate restriction via scripting

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3245 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 231563f6
......@@ -424,9 +424,9 @@ Core::init() {
OpenFlipper::Options::dirSeparator() + "windowState.dat");
if (file.open(QIODevice::ReadOnly)){
QByteArray bytes = file.readAll();
coreWidget_->restoreState( bytes );
file.close();
}
......@@ -435,9 +435,9 @@ Core::init() {
OpenFlipper::Options::dirSeparator() + "geometry.dat");
if (file2.open(QIODevice::ReadOnly)){
QByteArray bytes = file2.readAll();
coreWidget_->restoreGeometry( bytes );
file2.close();
}
......@@ -582,6 +582,19 @@ void Core::updateView() {
//-----------------------------------------------------------------------------
void Core::restrictFrameRate( bool _enable ) {
OpenFlipper::Options::restrictFrameRate( _enable );
}
//-----------------------------------------------------------------------------
void Core::setMaxFrameRate( int _rate ) {
OpenFlipper::Options::maxFrameRate( _rate );
OpenFlipper::Options::restrictFrameRate( true );
}
//-----------------------------------------------------------------------------
void
Core::clearAll()
{
......@@ -786,14 +799,14 @@ void Core::slotLogToFile(Logtype _type, QString _message){
}
// //-----------------------------------------------------------------------------
//
//
// void Core::slotGetPlugin(QString _name, QObject* & _plugin ){
// for (uint i=0; i < plugins.size(); i++)
// if (plugins[i].name == _name){
// _plugin = plugins[i].plugin;
// return;
// }
//
//
// _plugin = 0;
// return;
// }
......
......@@ -294,6 +294,12 @@ public slots:
/// Set the drawMode ( ; separated list )
void setDrawMode(QString _mode);
/// Enable or disable framerate restriction
void restrictFrameRate( bool _enable );
/// set the maximal framerate ( automatically enables framerate restriction )
void setMaxFrameRate( int _rate );
/** @} */
//===========================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment