• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kwallet

  • sources
  • kde-4.14
  • kdeutils
  • kwalletmanager
  • src
  • manager
kbetterthankdialogbase.cpp
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of the KDE project.
4  * Copyright (C) 2003-2005 George Staikos <staikos@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License version 2 as published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #include "kbetterthankdialogbase.h"
23 
24 void KBetterThanKDialogBase::clicked()
25 {
26  if (sender() == _allowOnce) {
27  done(3);
28  } else if (sender() == _allowAlways) {
29  done(1);
30  } else if (sender() == _deny) {
31  done(4);
32  } else if (sender() == _denyForever) {
33  done(2);
34  }
35 }
36 
37 
38 void KBetterThanKDialogBase::setLabel( const QString & label )
39 {
40  _label->setText(label);
41 }
42 
43 
44 KBetterThanKDialogBase::KBetterThanKDialogBase( QWidget* parent )
45  : QDialog( parent ), Ui_KBetterThanKDialogBase()
46 {
47  setupUi( this );
48  connect(_allowOnce, SIGNAL(clicked()), this, SLOT(clicked()));
49  connect(_allowAlways, SIGNAL(clicked()), this, SLOT(clicked()));
50  connect(_deny,SIGNAL(clicked()), this, SLOT(clicked()));
51  connect(_denyForever,SIGNAL(clicked()), this, SLOT(clicked()));
52  _allowOnce->setFocus();
53 }
54 
55 
56 void KBetterThanKDialogBase::accept()
57 {
58  setResult(3);
59 }
60 
61 
62 void KBetterThanKDialogBase::reject()
63 {
64  QDialog::reject();
65  setResult(4);
66 }
67 #include "kbetterthankdialogbase.moc"
QWidget
QWidget::setupUi
void setupUi(QWidget *widget)
QDialog::reject
virtual void reject()
QObject::sender
QObject * sender() const
QDialog::done
virtual void done(int r)
QDialog::setResult
void setResult(int i)
KBetterThanKDialogBase::reject
virtual void reject()
Definition: kbetterthankdialogbase.cpp:62
QString
Ui_KBetterThanKDialogBase
kbetterthankdialogbase.h
KBetterThanKDialogBase::setLabel
virtual void setLabel(const QString &label)
Definition: kbetterthankdialogbase.cpp:38
KBetterThanKDialogBase::KBetterThanKDialogBase
KBetterThanKDialogBase(QWidget *parent=0)
Definition: kbetterthankdialogbase.cpp:44
QDialog
KBetterThanKDialogBase::accept
virtual void accept()
Definition: kbetterthankdialogbase.cpp:56
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kwallet

Skip menu "kwallet"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal