Commit 3918077d authored by Mathieu Westphal's avatar Mathieu Westphal Committed by Kitware Robot

Merge topic 'EnablingUseOfContinuousFlush'

6ec9392d Enable use of continuous flush
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1
parents 9951bc69 6ec9392d
......@@ -74,7 +74,8 @@ public slots:
signals:
void eventRecorded(const QString& Widget,
const QString& Command,
const QString& Arguments);
const QString& Arguments,
const int& eventType);
protected:
QTextStream* Stream;
......
......@@ -68,13 +68,13 @@ void pqEventRecorder::setContinuousFlush(bool value)
if (value)
{
QObject::connect(this->ActiveObserver,
SIGNAL(eventRecorded(QString,QString,QString)),
SIGNAL(eventRecorded(QString,QString,QString, int)),
this, SLOT(flush()));
}
else
{
QObject::disconnect(this->ActiveObserver,
SIGNAL(eventRecorded(QString,QString,QString)),
SIGNAL(eventRecorded(QString,QString,QString, int)),
this, SLOT(flush()));
}
this->ContinuousFlush = value;
......
......@@ -63,7 +63,6 @@ public:
explicit pqEventRecorder(QObject *parent = 0);
~pqEventRecorder();
void setContinuousFlush(bool value);
bool continuousFlush() const;
void setFile(QIODevice* file);
......@@ -105,6 +104,13 @@ public slots:
// Connection signal into the correct slots
void check(bool value);
// Set the continuous flush value
// and connect/disconnect the current observer with
// this recorder
// If true, events are written on file as soon
// as they are recorded.
void setContinuousFlush(bool value);
protected:
pqEventObserver* ActiveObserver;
pqEventTranslator* ActiveTranslator;
......
......@@ -7,7 +7,7 @@
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
......@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
////////////////////////////////////////////////////////////////////////////////////
// pqPythonEventObserver
pqPythonEventObserver::pqPythonEventObserver(QObject* p)
pqPythonEventObserver::pqPythonEventObserver(QObject* p)
: pqEventObserver(p)
{
}
......@@ -81,5 +81,7 @@ void pqPythonEventObserver::onRecordEvent(
pycommand = pycommand.arg(Arguments);
pycommand = pycommand.arg(eventType);
*this->Stream << pycommand << "\n";
emit eventRecorded(widget, command, arguments, eventType);
}
}
......@@ -107,6 +107,11 @@ pqRecordEventsDialog::pqRecordEventsDialog(pqEventRecorder* recorder,
this->Implementation->Recorder,
SLOT(unpause(bool)));
QObject::connect(this->Implementation->Ui.continuousFlush,
SIGNAL(toggled(bool)),
this->Implementation->Recorder,
SLOT(setContinuousFlush(bool)));
QObject::connect(this->Implementation->Recorder,
SIGNAL(started()),
this,
......
......@@ -241,6 +241,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="continuousFlush">
<property name="text">
<string>Continuous Flush</string>
</property>
<property name="toolTip">
<string>Write events to file as soon as they are recorded</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
......
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