Commit 0e2751cd authored by Mike Kremer's avatar Mike Kremer

Reimplemented in-scene logger rendering. Now using QPropertyAnimation class...

Reimplemented in-scene logger rendering. Now using QPropertyAnimation class for the sliding animations.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11980 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 739734cf
......@@ -582,6 +582,8 @@ Core::init() {
coreWidget_->toolSplitter_->restoreState (windowStates.value("Core/ToolSplitter").toByteArray ());
coreWidget_->splitter_->restoreState (windowStates.value("Core/LogSplitter").toByteArray ());
// Update logger
coreWidget_->showLogger(OpenFlipper::Options::loggerState());
coreWidget_->show();
applyOptions();
......
This diff is collapsed.
......@@ -52,8 +52,9 @@
//== INCLUDES =================================================================
#include <QSettings>
#include <QGraphicsProxyWidget>
#include <QPropertyAnimation>
#include <OpenFlipper/common/GlobalDefines.hh>
//== FORWARDDECLARATIONS ======================================================
......@@ -127,9 +128,17 @@ class DLLEXPORT QtSlideWindow : public QGraphicsProxyWidget
/// autohide button presed
void autohidePressed ();
/// Executed if the timeline reches the end of its animation
void timelineFinished ();
/// Slide widget up
void slideUp();
/// Slide widget down
void slideDown();
/// Call this to correctly set start and ending positions
void updateParentGeometry();
// Slot is called whenever the animation is finished
void animationFinished();
private:
......@@ -143,15 +152,23 @@ class DLLEXPORT QtSlideWindow : public QGraphicsProxyWidget
QtGraphicsButton *autohideButton_;
QtGraphicsButton *detachButton_;
// animation
QTimeLine *hideTimeLine_;
QGraphicsItemAnimation *hideAnimation_;
// detached dialog
QDialog *dialog_;
// temporary widget
QWidget *tempWidget_;
// Starting position (for animation)
QPointF startP_;
// Ending position (for animation)
QPointF endP_;
// Track if widget is at bottom position
bool down_;
// Animation object
QPropertyAnimation* animation_;
// Is widget animating in this moment?
bool animating_;
};
//=============================================================================
......
......@@ -55,6 +55,11 @@ LoggerWidget::LoggerWidget( QWidget *parent)
: QWidget(parent),
newData_(true)
{
// Don't delete this widget on close actions
// since it may be embedded in different widget
// containers at the same time
setAttribute(Qt::WA_DeleteOnClose, false);
QVBoxLayout* vlayout = new QVBoxLayout();
QHBoxLayout* hlayout = new QHBoxLayout();
QHBoxLayout* hlayout2 = new QHBoxLayout();
......
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