51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "connectdialog.h"
-#include "fullscreenexitbutton.h"
#include "keymenu.h"
#include "mainwindow.h"
#include "preferences.h"
MainWindow::MainWindow(QString url, int quality, int listen_port, bool view_only):
QMainWindow(0),
vnc_view(0),
- scroll_area(new ScrollArea(0)),
+ scroll_area(new ScrollArea(this)),
input_toolbuttons(new QActionGroup(this)),
key_menu(0)
{
setCentralWidget(scroll_area);
- FullScreenExitButton* fullscreen_exit_button = new FullScreenExitButton(this);
- connect(fullscreen_exit_button, SIGNAL(clicked()),
+ connect(scroll_area, SIGNAL(fullscreenButtonClicked()),
this, SLOT(toggleFullscreen()));
grabZoomKeys(true);
tr("<center><h1>Presence VNC 0.8</h1>\
<p>A touchscreen friendly VNC client</p>\
<p><a href=\"http://presencevnc.garage.maemo.org/\">http://presencevnc.garage.maemo.org/</a></p></center>\
- <small><p>©2010 Christian Pulvermacher <pulvermacher@gmx.de><br />\
+ <small><p>©2010-2012 Christian Pulvermacher <pulvermacher@gmx.de><br />\
Based on KRDC, © 2007-2008 Urs Wolfer<br />\
and LibVNCServer, © 2001-2003 Johannes E. Schindelin</p>\
<p>This program is free software; License: <a href=\"http://www.gnu.org/licenses/gpl-2.0.html\">GNU GPL 2</a> or later.</p></small>"));
connect(vnc_view, SIGNAL(statusChanged(RemoteView::RemoteStatus)),
this, SLOT(statusChanged(RemoteView::RemoteStatus)));
+ connect(vnc_view, SIGNAL(errorMessage(QString, QString)),
+ scroll_area, SLOT(showMessage(QString, QString)));
scroll_area->setWidget(vnc_view);
vnc_view->start();
setWindowTitle(QString("Presence VNC - %1").arg(vnc_view->host()) + (view_only?tr(" [View Only]"):""));
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
}