1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
*
* Authorization dialog for kbluetooth
*
* Copyright (C) 2006 Daniel Gollub <dgollub@suse.de>
*
*
* This file is part of kbluetooth.
*
* kbluetooth is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* libkbluetooth is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with libkbluetooth; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "authorize.h"
#include "authdialog.h"
AuthorizeDialog::AuthorizeDialog(const TQString &addr, const TQString &devName, const TQString &service) :
KDialogBase(NULL, "authrequest", true, "Bluetooth Authorization Request",
(Ok | Cancel), Ok, false,
KGuiItem(i18n("Accept"), "accept"),
KGuiItem(i18n("Reject"), "reject"))
{
TQString action;
action = (service.isEmpty()
? i18n("<b>%1</b> (device address <b>%2</b>) wants to act as Input Device.")
: i18n("<b>%1</b> (device address <b>%2</b>) wants to act as Input Device for %3.")).
arg(devName).arg(addr).arg(service);
authDlg = new AuthDialog(this);
authDlg->messageLabel->setText(authDlg->messageLabel->text().arg(action));
connect(this, SIGNAL(okClicked()), SLOT(close()));
setMainWidget(authDlg);
}
AuthorizeDialog::~AuthorizeDialog()
{
delete authDlg;
}
#include "authorize.moc"
|