"Fossies" - the Fresh Open Source Software Archive  

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

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

mainwindow.cpp  (kaffeine-2.0.16):mainwindow.cpp  (kaffeine-2.0.17)
skipping to change at line 293 skipping to change at line 293
#if HAVE_DVB == 1 #if HAVE_DVB == 1
tabBar->addTab(QIcon::fromTheme(QLatin1String("video-television"), QIcon( ":video-television")), i18n("Television")); tabBar->addTab(QIcon::fromTheme(QLatin1String("video-television"), QIcon( ":video-television")), i18n("Television"));
#endif /* HAVE_DVB == 1 */ #endif /* HAVE_DVB == 1 */
tabBar->setShape(QTabBar::RoundedWest); tabBar->setShape(QTabBar::RoundedWest);
tabBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); tabBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(activateTab(int)) ); connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(activateTab(int)) );
navigationBar->addWidget(tabBar); navigationBar->addWidget(tabBar);
// control bar // control bar
controlBar = new QToolBar(QLatin1String("control_bar")); controlBar = new QToolBar(QLatin1String("control_bar"), this);
this->addToolBar(Qt::BottomToolBarArea, controlBar); this->addToolBar(Qt::BottomToolBarArea, controlBar);
controlBar->setToolButtonStyle(Qt::ToolButtonIconOnly); controlBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
autoHideControlBar = false; autoHideControlBar = false;
cursorHideTimer = new QTimer(this); cursorHideTimer = new QTimer(this);
cursorHideTimer->setInterval(1500); cursorHideTimer->setInterval(1500);
cursorHideTimer->setSingleShot(true); cursorHideTimer->setSingleShot(true);
connect(cursorHideTimer, SIGNAL(timeout()), this, SLOT(hideCursor())); connect(cursorHideTimer, SIGNAL(timeout()), this, SLOT(hideCursor()));
skipping to change at line 440 skipping to change at line 440
} }
void MainWindow::close() void MainWindow::close()
{ {
bool ok = true; bool ok = true;
#if HAVE_DVB == 1 #if HAVE_DVB == 1
dvbTab->mayCloseApplication(&ok, mediaWidget); dvbTab->mayCloseApplication(&ok, mediaWidget);
#endif /* HAVE_DVB == 1 */ #endif /* HAVE_DVB == 1 */
if (ok) if (ok) {
writeSettings();
mediaWidget->stop();
QMainWindow::close();
Configuration::detach();
QCoreApplication::exit(0); QCoreApplication::exit(0);
}
} }
void MainWindow::readSettings() void MainWindow::readSettings()
{ {
QSettings settings(QCoreApplication::organizationName(), QCoreApplication::a pplicationName()); QSettings settings(QCoreApplication::organizationName(), QCoreApplication::a pplicationName());
const QByteArray geometry = settings.value("geometry", QByteArray()).toByteA rray(); const QByteArray geometry = settings.value("geometry", QByteArray()).toByteA rray();
if (geometry.isEmpty()) { if (geometry.isEmpty()) {
const QRect availableGeometry = QApplication::desktop()->availableGeomet ry(this); const QRect availableGeometry = QApplication::desktop()->availableGeomet ry(this);
resize(availableGeometry.width() / 3, availableGeometry.height() / 2); resize(availableGeometry.width() / 3, availableGeometry.height() / 2);
move((availableGeometry.width() - width()) / 2, move((availableGeometry.width() - width()) / 2,
skipping to change at line 834 skipping to change at line 839
} }
void MainWindow::closeEvent(QCloseEvent *event) void MainWindow::closeEvent(QCloseEvent *event)
{ {
bool ok = true; bool ok = true;
emit mayCloseApplication(&ok, this); emit mayCloseApplication(&ok, this);
if (!ok) { if (!ok) {
event->ignore(); event->ignore();
} else { } else {
writeSettings(); MainWindow::close();
QMainWindow::closeEvent(event);
} }
} }
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) ...
 End of changes. 4 change blocks. 
4 lines changed or deleted 8 lines changed or added

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