Changeset 121 for smplayer/vendor/current/src/floatingwidget.cpp
- Timestamp:
- Mar 15, 2012, 5:14:10 PM (14 years ago)
- File:
-
- 1 edited
-
smplayer/vendor/current/src/floatingwidget.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/src/floatingwidget.cpp
r118 r121 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 1 Ricardo Villalba <[email protected]>2 Copyright (C) 2006-201> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 22 22 #include <QHBoxLayout> 23 23 24 25 26 27 24 28 FloatingWidget::FloatingWidget( QWidget * parent ) 25 29 : QWidget( parent, Qt::Window | Qt::FramelessWindowHint | 26 30 Qt::WindowStaysOnTopHint ) 27 31 { 32 33 34 35 28 36 setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum ); 29 37 … … 40 48 _margin = 0; 41 49 _animated = false; 50 42 51 animation_timer = new QTimer(this); 43 52 animation_timer->setInterval(2); 44 53 connect( animation_timer, SIGNAL(timeout()), this, SLOT(animate()) ); 45 54 #endif 46 55 connect( &auto_hide_timer, SIGNAL(timeout()), 47 56 this, SLOT(checkUnderMouse()) ); … … 50 59 51 60 FloatingWidget::~FloatingWidget() { 61 62 63 52 64 } 53 65 … … 105 117 106 118 void FloatingWidget::showAnimated(QPoint final_position, Movement movement) { 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 107 137 current_movement = movement; 108 138 final_y = final_position.y(); … … 118 148 119 149 animation_timer->start(); 150 120 151 } 121 152 153 122 154 void FloatingWidget::animate() { 123 155 if (current_y == final_y) { … … 128 160 } 129 161 } 162 130 163 131 164 void FloatingWidget::checkUnderMouse() {
Note:
See TracChangeset
for help on using the changeset viewer.
