• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • knewstuff
  • knewstuff2
  • core
knewstuff2/core/installation.cpp
Go to the documentation of this file.
1/*
2 This file is part of KNewStuff2.
3 Copyright (c) 2007 Josef Spillner <spillner@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
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 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "installation.h"
20
21struct KNS::InstallationPrivate {
22 InstallationPrivate() {
23 m_checksumpolicy = Installation::CheckIfPossible;
24 m_signaturepolicy = Installation::CheckIfPossible;
25 m_scope = Installation::ScopeUser;
26 m_customname = false;
27 }
28
29 QString m_command;
30 QString m_uninstallCommand;
31 QString m_uncompression;
32 QString m_standardresourcedir;
33 QString m_targetdir;
34 QString m_installpath;
35 QString m_absoluteinstallpath;
36 Installation::Policy m_checksumpolicy;
37 Installation::Policy m_signaturepolicy;
38 Installation::Scope m_scope;
39 bool m_customname;
40};
41
42using namespace KNS;
43
44Installation::Installation()
45 : d(new InstallationPrivate)
46{
47}
48
49Installation::~Installation()
50{
51 delete d;
52}
53
54void Installation::setUncompression(const QString& uncompression)
55{
56 d->m_uncompression = uncompression;
57}
58
59void Installation::setCommand(const QString& command)
60{
61 d->m_command = command;
62}
63
64void Installation::setUninstallCommand(const QString& command)
65{
66 d->m_uninstallCommand = command;
67}
68
69void Installation::setStandardResourceDir(const QString& dir)
70{
71 d->m_standardresourcedir = dir;
72}
73
74void Installation::setTargetDir(const QString& dir)
75{
76 d->m_targetdir = dir;
77}
78
79void Installation::setInstallPath(const QString& dir)
80{
81 d->m_installpath = dir;
82}
83
84void Installation::setAbsoluteInstallPath(const QString& dir)
85{
86 d->m_absoluteinstallpath = dir;
87}
88
89void Installation::setChecksumPolicy(Policy policy)
90{
91 d->m_checksumpolicy = policy;
92}
93
94void Installation::setSignaturePolicy(Policy policy)
95{
96 d->m_signaturepolicy = policy;
97}
98
99void Installation::setScope(Scope scope)
100{
101 d->m_scope = scope;
102}
103
104void Installation::setCustomName(bool customname)
105{
106 d->m_customname = customname;
107}
108
109QString Installation::uncompression() const
110{
111 return d->m_uncompression;
112}
113
114QString Installation::command() const
115{
116 return d->m_command;
117}
118
119QString Installation::uninstallCommand() const
120{
121 return d->m_uninstallCommand;
122}
123
124QString Installation::standardResourceDir() const
125{
126 return d->m_standardresourcedir;
127}
128
129QString Installation::targetDir() const
130{
131 return d->m_targetdir;
132}
133
134QString Installation::installPath() const
135{
136 return d->m_installpath;
137}
138
139QString Installation::absoluteInstallPath() const
140{
141 return d->m_absoluteinstallpath;
142}
143
144bool Installation::isRemote() const
145{
146 if (!installPath().isEmpty()) return false;
147 if (!targetDir().isEmpty()) return false;
148 if (!absoluteInstallPath().isEmpty()) return false;
149 if (!standardResourceDir().isEmpty()) return false;
150 return true;
151}
152
153Installation::Policy Installation::checksumPolicy() const
154{
155 return d->m_checksumpolicy;
156}
157
158Installation::Policy Installation::signaturePolicy() const
159{
160 return d->m_signaturepolicy;
161}
162
163bool Installation::customName() const
164{
165 return d->m_customname;
166}
167
168Installation::Scope Installation::scope() const
169{
170 return d->m_scope;
171}
172
KNS::Installation::installPath
QString installPath() const
Definition: knewstuff2/core/installation.cpp:134
KNS::Installation::Scope
Scope
Definition: knewstuff2/core/installation.h:63
KNS::Installation::ScopeUser
@ ScopeUser
Definition: knewstuff2/core/installation.h:64
KNS::Installation::absoluteInstallPath
QString absoluteInstallPath() const
Definition: knewstuff2/core/installation.cpp:139
KNS::Installation::checksumPolicy
Policy checksumPolicy() const
Definition: knewstuff2/core/installation.cpp:153
KNS::Installation::~Installation
~Installation()
Destructor.
Definition: knewstuff2/core/installation.cpp:49
KNS::Installation::setUninstallCommand
void setUninstallCommand(const QString &command)
Definition: knewstuff2/core/installation.cpp:64
KNS::Installation::standardResourceDir
QString standardResourceDir() const
Definition: knewstuff2/core/installation.cpp:124
KNS::Installation::uncompression
QString uncompression() const
Definition: knewstuff2/core/installation.cpp:109
KNS::Installation::Policy
Policy
Definition: knewstuff2/core/installation.h:57
KNS::Installation::CheckIfPossible
@ CheckIfPossible
Definition: knewstuff2/core/installation.h:59
KNS::Installation::isRemote
bool isRemote() const
Definition: knewstuff2/core/installation.cpp:144
KNS::Installation::command
QString command() const
Definition: knewstuff2/core/installation.cpp:114
KNS::Installation::uninstallCommand
QString uninstallCommand() const
Definition: knewstuff2/core/installation.cpp:119
KNS::Installation::setCommand
void setCommand(const QString &command)
Definition: knewstuff2/core/installation.cpp:59
KNS::Installation::Installation
Installation()
Constructor.
Definition: knewstuff2/core/installation.cpp:44
KNS::Installation::setChecksumPolicy
void setChecksumPolicy(Policy policy)
Definition: knewstuff2/core/installation.cpp:89
KNS::Installation::setScope
void setScope(Scope scope)
Definition: knewstuff2/core/installation.cpp:99
KNS::Installation::setTargetDir
void setTargetDir(const QString &dir)
Definition: knewstuff2/core/installation.cpp:74
KNS::Installation::setSignaturePolicy
void setSignaturePolicy(Policy policy)
Definition: knewstuff2/core/installation.cpp:94
KNS::Installation::setAbsoluteInstallPath
void setAbsoluteInstallPath(const QString &dir)
Definition: knewstuff2/core/installation.cpp:84
KNS::Installation::scope
Scope scope() const
Definition: knewstuff2/core/installation.cpp:168
KNS::Installation::setStandardResourceDir
void setStandardResourceDir(const QString &dir)
Definition: knewstuff2/core/installation.cpp:69
KNS::Installation::customName
bool customName() const
Definition: knewstuff2/core/installation.cpp:163
KNS::Installation::targetDir
QString targetDir() const
Definition: knewstuff2/core/installation.cpp:129
KNS::Installation::signaturePolicy
Policy signaturePolicy() const
Definition: knewstuff2/core/installation.cpp:158
KNS::Installation::setInstallPath
void setInstallPath(const QString &dir)
Definition: knewstuff2/core/installation.cpp:79
KNS::Installation::setUncompression
void setUncompression(const QString &uncompression)
Definition: knewstuff2/core/installation.cpp:54
KNS::Installation::setCustomName
void setCustomName(bool customname)
Definition: knewstuff2/core/installation.cpp:104
installation.h
KNS
Definition: knewstuff2/core/author.h:27
dir
QString dir(const QString &fileClass)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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