- /*
- //move remaining buttons to the right
- QWidget *spacer = new QWidget();
- spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- toolbar->addWidget(spacer);
- */
-
- QSettings settings;
- zoom_slider = new QSlider(Qt::Horizontal, 0);
- zoom_slider->setRange(0, 100);
- connect(zoom_slider, SIGNAL(valueChanged(int)),
- this, SLOT(setZoomLevel(int)));
- connect(zoom_slider, SIGNAL(sliderReleased()),
- this, SLOT(forceRepaint()));
- zoom_slider->setValue(settings.value("zoomlevel", 95).toInt());
- toolbar->addWidget(zoom_slider);
-
- toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/general_fullsize.png"), "", this, SLOT(toggleFullscreen()));
- addToolBar(toolbar);
- toolbar->setVisible(settings.value("show_toolbar", true).toBool());
- toolbar->setEnabled(false);
-
- //set up menu
- QAction *connect_action = new QAction(tr("Connect"), this);
- disconnect_action = new QAction(tr("Disconnect"), this);
- show_toolbar = new QAction(tr("Show Toolbar"), this);
- show_toolbar->setCheckable(true);
- show_toolbar->setChecked(settings.value("show_toolbar", true).toBool());
- QAction *pref_action = new QAction(tr("Preferences"), this);
- QAction *about_action = new QAction(tr("About"), this);
+ QSettings settings;
+ zoom_slider = new QSlider(Qt::Horizontal, 0);
+ zoom_slider->setRange(0, 100);
+ connect(zoom_slider, SIGNAL(valueChanged(int)),
+ this, SLOT(setZoomLevel(int)));
+ connect(zoom_slider, SIGNAL(sliderReleased()),
+ this, SLOT(zoomSliderReleased()));
+ zoom_slider->setValue(settings.value("zoomlevel", 95).toInt());
+ toolbar->addWidget(zoom_slider);
+
+#ifdef Q_WS_MAEMO_5
+ toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/general_fullsize.png"), "", this, SLOT(toggleFullscreen()));
+#else
+ toolbar->addAction(tr("Toggle Fullscreen"), this, SLOT(toggleFullscreen()));
+#endif
+ addToolBar(toolbar);
+ toolbar->setVisible(settings.value("show_toolbar", true).toBool());
+ toolbar->setEnabled(false);
+
+ //set up menu
+ QAction *connect_action = new QAction(tr("Connect"), this);
+ disconnect_action = new QAction(tr("Disconnect"), this);
+ show_toolbar = new QAction(tr("Show toolbar"), this);
+ show_toolbar->setCheckable(true);
+ show_toolbar->setChecked(settings.value("show_toolbar", true).toBool());
+ QAction *pref_action = new QAction(tr("Preferences"), this);
+ QAction *about_action = new QAction(tr("About"), this);