Warning, file /network/krfb/krfb/connectiondialog.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 Copyright (C) 2010 Collabora Ltd <info@collabora.co.uk> 0003 @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk> 0004 Copyright (C) 2004 Nadeem Hasan <nhasan@kde.org> 0005 0006 This program is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU General Public 0008 License as published by the Free Software Foundation; either 0009 version 2 of the License, or (at your option) any later version. 0010 0011 This program is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 General Public License for more details. 0015 0016 You should have received a copy of the GNU General Public License 0017 along with this program; see the file COPYING. If not, write to 0018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 Boston, MA 02110-1301, USA. 0020 */ 0021 0022 #ifndef CONNECTIONDIALOG_H 0023 #define CONNECTIONDIALOG_H 0024 0025 #include "ui_connectionwidget.h" 0026 #include <QDialog> 0027 0028 template <typename UI> 0029 class ConnectionDialog : public QDialog 0030 { 0031 public: 0032 explicit ConnectionDialog(QWidget *parent); 0033 ~ConnectionDialog() override {}; 0034 0035 void setAllowRemoteControl(bool b); 0036 bool allowRemoteControl(); 0037 0038 protected: 0039 QWidget *m_connectWidget; 0040 UI m_ui; 0041 }; 0042 0043 template <typename UI> 0044 void ConnectionDialog<UI>::setAllowRemoteControl(bool b) 0045 { 0046 m_ui.cbAllowRemoteControl->setChecked(b); 0047 m_ui.cbAllowRemoteControl->setVisible(b); 0048 } 0049 0050 template <typename UI> 0051 bool ConnectionDialog<UI>::allowRemoteControl() 0052 { 0053 return m_ui.cbAllowRemoteControl->isChecked(); 0054 } 0055 0056 //********* 0057 0058 class InvitationsConnectionDialog : public ConnectionDialog<Ui::ConnectionWidget> 0059 { 0060 Q_OBJECT 0061 public: 0062 explicit InvitationsConnectionDialog(QWidget *parent); 0063 void setRemoteHost(const QString & host); 0064 }; 0065 0066 //********* 0067 0068 #endif // CONNECTIONDIALOG_H 0069