"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/mainwindow.cpp" between
kaffeine-2.0.17.tar.gz and kaffeine-2.0.18.tar.gz

About: Kaffeine is a full featured Multimedia-Player for KDE (default backend is xine).

mainwindow.cpp  (kaffeine-2.0.17):mainwindow.cpp  (kaffeine-2.0.18)
skipping to change at line 37 skipping to change at line 37
#include <kio/deletejob.h> #include <kio/deletejob.h>
#include <KRecentFilesAction> #include <KRecentFilesAction>
#include <KSharedConfig> #include <KSharedConfig>
#include <KShortcutsDialog> #include <KShortcutsDialog>
#include <QApplication> #include <QApplication>
#include <QCommandLineOption> #include <QCommandLineOption>
#include <QDBusConnection> #include <QDBusConnection>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QFileDialog> #include <QFileDialog>
#include <QHoverEvent> #include <QHoverEvent>
#include <QWheelEvent>
#include <QInputDialog> #include <QInputDialog>
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QMainWindow> #include <QMainWindow>
#include <QMenu> #include <QMenu>
#include <QMenuBar> #include <QMenuBar>
#include <QSettings> #include <QSettings>
#include <QStackedLayout> #include <QStackedLayout>
#include <QTabBar> #include <QTabBar>
#include <QToolBar> #include <QToolBar>
skipping to change at line 852 skipping to change at line 851
bool MainWindow::event(QEvent *event) bool MainWindow::event(QEvent *event)
{ {
bool retVal = QMainWindow::event(event); // this has to be done before ca lling setVisible() bool retVal = QMainWindow::event(event); // this has to be done before ca lling setVisible()
// FIXME we depend on QEvent::HoverMove (instead of QEvent::MouseMove) // FIXME we depend on QEvent::HoverMove (instead of QEvent::MouseMove)
// but the latter depends on mouse tracking being enabled on this widget // but the latter depends on mouse tracking being enabled on this widget
// and all its children (especially the video widget) ... // and all its children (especially the video widget) ...
switch (event->type()) { switch (event->type()) {
case QEvent::Wheel: {
int delta, y;
QWheelEvent *wheel = static_cast<QWheelEvent *>(event);
y = wheel->pixelDelta().y();
if (!y)
y = wheel->angleDelta().y();
if (!y)
break;
delta = (y < 0) ? -1 : 1;
mediaWidget->setVolumeUnderMouse(mediaWidget->getVolume() + delta
);
break;
}
case QEvent::HoverMove: { case QEvent::HoverMove: {
int x = reinterpret_cast<QHoverEvent *> (event)->pos().x(); int x = reinterpret_cast<QHoverEvent *> (event)->pos().x();
int y = reinterpret_cast<QHoverEvent *> (event)->pos().y(); int y = reinterpret_cast<QHoverEvent *> (event)->pos().y();
if ((y < 0) || (y >= height()) || if ((y < 0) || (y >= height()) ||
(x < 0) || (x >= width())) { (x < 0) || (x >= width())) {
// QHoverEvent sometimes reports quite strange coordinate s - ignore them // QHoverEvent sometimes reports quite strange coordinate s - ignore them
return retVal; return retVal;
} }
 End of changes. 2 change blocks. 
18 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)