Merge branch 'master' of https://vcs.maemo.org/git/presencevnc
authorChristian Pulvermacher <pulvermacher@gmx.de>
Wed, 1 Feb 2012 22:36:35 +0000 (23:36 +0100)
committerChristian Pulvermacher <pulvermacher@gmx.de>
Wed, 1 Feb 2012 22:36:35 +0000 (23:36 +0100)
src/mainwindow.cpp
src/vncview.cpp
src/vncview.h

index 07bcf51..d54c42f 100644 (file)
@@ -359,8 +359,11 @@ void MainWindow::resizeEvent(QResizeEvent *event)
         vnc_view->setZoomLevel(zoom_slider->value());
 
 #ifdef Q_WS_MAEMO_5
-    //hide zoom slider in portrait mode
-    zoom_slider->setVisible(height() < width());
+    //in portrait mode, show only zoom slider and fullscreen button
+    //(opening HW keyboard or OSK will return to landscape)
+    const bool portrait = height() > width();
+    for(int i = 0; i < 7; i++)
+        toolbar->actions()[i]->setVisible(!portrait);
 #endif
 }
 
index 3885050..88c42bd 100644 (file)
@@ -110,7 +110,7 @@ bool VncView::eventFilter(QObject *obj, QEvent *event)
     return RemoteView::eventFilter(obj, event);
 }
 
-QSize VncView::framebufferSize()
+QSize VncView::framebufferSize() const
 {
     return m_frame.size();
 }
@@ -150,7 +150,7 @@ void VncView::startQuitting()
     setStatus(Disconnected);
 }
 
-bool VncView::isQuitting()
+bool VncView::isQuitting() const
 {
     return m_quitFlag;
 }
index d763b99..82de593 100644 (file)
@@ -43,11 +43,11 @@ public:
     explicit VncView(QWidget *parent = 0, const KUrl &url = KUrl(), RemoteView::Quality quality = RemoteView::Medium, int listen_port = 0);
     ~VncView();
 
-    QSize framebufferSize();
+    QSize framebufferSize() const;
     QSize sizeHint() const;
     QSize minimumSizeHint() const;
-    bool isQuitting();
-    qreal zoomFactor() { return m_horizontalFactor;} //assumes fixed aspect ratio
+    bool isQuitting() const;
+    qreal zoomFactor() const { return m_horizontalFactor;} //assumes fixed aspect ratio
     void reloadSettings();
     bool start();
     bool supportsScaling() const;
@@ -57,7 +57,7 @@ public:
     void setViewOnly(bool viewOnly);
     void showDotCursor(DotCursorState state);
     void useFastTransformations(bool enabled);
-    QPoint cursorPosition() { return QPoint(cursor_x, cursor_y); }
+    QPoint cursorPosition() const { return QPoint(cursor_x, cursor_y); }
     void setDisplayOff(bool off) { display_off = off; }
 
 public slots: