summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp15
1 files changed, 15 insertions, 0 deletions
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
@@ -97,30 +97,44 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
rotateButton->setToggleButton(true);
rotateButton->setOn(true);
connect(rotateButton,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool)));
autoRotate = true;
btn = new QToolButton(bar);
btn->setIconSet( Resource::loadIconSet( "1to1" ) );
btn->setToggleButton(true);
btn->setOn(false);
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;
if (m_disp) {
m_disp->setAutoRotate(how);
}
}
void PMainWindow::slotScaleToggled(bool how)
{
autoScale = !how;
if (m_disp) {
@@ -222,24 +236,25 @@ void PMainWindow::initT( const char* name, T** ptr, int id) {
this,SLOT(slotReturn()));
}
void PMainWindow::initInfo() {
initT<imageinfo>( "Image Info", &m_info, ImageInfo );
connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
}
void PMainWindow::initDisp() {
initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );
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&)));
}
}
/**
* With big Screen the plan could be to 'detach' the image
* window if visible and to create a ne wone
* init* already supports it but I make no use of it for
* now. We set filename and raise
*
* ### FIXME and talk to alwin
*/