• 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
applicationsmanager.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 Valentin Rusu <kde@rusu.info>
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; see the file COPYING. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include "applicationsmanager.h"
21 #include "connectedappmodel.h"
22 #include "authorizedappmodel.h"
23 #include "kwallet.h"
24 
25 #include <QStyledItemDelegate>
26 #include <QPainter>
27 #include <QStandardItemModel>
28 #include <kdebug.h>
29 
30 ApplicationsManager::ApplicationsManager(QWidget* parent):
31  QWidget(parent),
32  _wallet(0),
33  _connectedAppsModel(0),
34  _authorizedAppModel(0)
35 {
36  setupUi(this);
37 }
38 
39 ApplicationsManager::~ApplicationsManager()
40 {
41  delete _connectedAppsModel;
42  delete _authorizedAppModel;
43 }
44 
45 void ApplicationsManager::setWallet(KWallet::Wallet* wallet)
46 {
47  Q_ASSERT(wallet != 0);
48  _wallet = wallet;
49 
50  // create the disconnect widget menu
51  _connectedAppsModel = new ConnectedAppModel(_wallet);
52  _connectedApps->setWallet(_wallet);
53  _connectedApps->setModel(_connectedAppsModel);
54 
55  _authorizedAppModel = new AuthorizedAppModel(_wallet);
56  _authorizedApps->setWallet(_wallet);
57  _authorizedApps->setModel(_authorizedAppModel);
58 }
59 
60 #include "applicationsmanager.moc"
QWidget
QWidget::setupUi
void setupUi(QWidget *widget)
applicationsmanager.h
connectedappmodel.h
ApplicationsManager::ApplicationsManager
ApplicationsManager(QWidget *parent)
Definition: applicationsmanager.cpp:30
ApplicationsManager::setWallet
void setWallet(KWallet::Wallet *wallet)
Definition: applicationsmanager.cpp:45
AuthorizedAppModel
Definition: authorizedappmodel.h:30
authorizedappmodel.h
ApplicationsManager::~ApplicationsManager
virtual ~ApplicationsManager()
Definition: applicationsmanager.cpp:39
ConnectedAppModel
Definition: connectedappmodel.h:29
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