From e61f3d63c310e4e560bc38f41c1390f246b5f670 Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 13 Apr 2004 21:44:12 +0000 Subject: zoomer widget better integrated, size of it depends on the size of the displayed image, may switched off by user and so on. --- (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 3650493..ef23f79 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -106,12 +106,26 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) connect(btn,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); autoScale = true; + btn = new QToolButton(bar); + btn->setIconSet( Resource::loadIconSet( "mag" ) ); + btn->setToggleButton(true); + btn->setOn(true); + connect(btn,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); + zoomerOn = true; } PMainWindow::~PMainWindow() { odebug << "Shutting down" << oendl; } +void PMainWindow::slotZoomerToggled(bool how) +{ + zoomerOn = how; + if (m_disp) { + m_disp->setShowZoomer(zoomerOn); + } +} + void PMainWindow::slotRotateToggled(bool how) { autoRotate = how; @@ -231,6 +245,7 @@ void PMainWindow::initDisp() { if (m_disp) { m_disp->setAutoScale(autoScale); m_disp->setAutoRotate(autoRotate); + m_disp->setShowZoomer(zoomerOn); connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); } } -- cgit v0.9.0.2