1 /****************************************************************************
3 ** Copyright (C) 2007 Urs Wolfer <uwolfer @ kde.org>
5 ** This file is part of KDE.
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program; see the file COPYING. If not, write to
19 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 ** Boston, MA 02110-1301, USA.
22 ****************************************************************************/
24 #include "specialkeysdialog.h"
31 SpecialKeysDialog::SpecialKeysDialog(QWidget
*parent
, RemoteView
*remoteView
)
33 m_remoteView(remoteView
)
35 setCaption(i18n("Special Keys"));
38 QLabel
*descriptionLabel
= new QLabel(i18n("Enter a special key or a key combination to sent the the remote desktop."
39 "<br /><br />This function allows you to send a key combination like Ctrl+Q to the remote computer."
40 "<br /><br />When you have finished entering the special keys, close this window."), this);
41 descriptionLabel
->setWordWrap(true);
42 descriptionLabel
->setTextFormat(Qt::RichText
);
44 setMainWidget(descriptionLabel
);
45 setFocusPolicy(Qt::StrongFocus
);
50 SpecialKeysDialog::~SpecialKeysDialog()
55 void SpecialKeysDialog::keyPressEvent(QKeyEvent
*event
)
57 // kDebug(5010) << "key press" << event->key();
59 m_remoteView
->keyEvent(event
);
64 void SpecialKeysDialog::keyReleaseEvent(QKeyEvent
*event
)
66 // kDebug(5010) << "key release" << event->key();
68 m_remoteView
->keyEvent(event
);
73 #include "specialkeysdialog.moc"