2
* demo_client.cpp - client for demo-server
4
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>
6
* This file is part of iTALC - http://italc.sourceforge.net
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
* Boston, MA 02111-1307, USA.
26
#include <QtGui/QIcon>
27
#include <QtGui/QLayout>
28
#include <QtGui/QApplication>
29
#include <QtGui/QDesktopWidget>
31
#include "demo_client.h"
33
#include "lock_widget.h"
34
#include "local_system.h"
37
demoClient::demoClient( const QString & _host, bool _fullscreen ) :
39
m_toplevel( _fullscreen ?
40
new lockWidget( lockWidget::NoBackground )
44
m_toplevel->setWindowTitle( tr( "iTALC Demo" ) );
45
m_toplevel->setWindowIcon( QPixmap( ":/resources/display.png" ) );
46
m_toplevel->setAttribute( Qt::WA_DeleteOnClose, TRUE );
47
m_toplevel->resize( QApplication::desktop()->availableGeometry( m_toplevel ).size() );
49
QVBoxLayout * toplevel_layout = new QVBoxLayout;
50
toplevel_layout->setMargin( 0 );
51
toplevel_layout->setSpacing( 0 );
52
toplevel_layout->addWidget( new vncView( _host, m_toplevel, TRUE ) );
54
m_toplevel->setLayout( toplevel_layout );
56
connect( m_toplevel, SIGNAL( destroyed( QObject * ) ),
57
this, SLOT( viewDestroyed( QObject * ) ) );
60
m_toplevel->showMaximized();
61
localSystem::activateWindow( m_toplevel );
69
demoClient::~demoClient()
77
void demoClient::viewDestroyed( QObject * _obj )
79
if( m_toplevel == _obj )
88
#include "demo_client.moc"