swift
applicationinfolist.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_APPLICATIONINFOLIST_H
7 #define SWIFT_MISC_APPLICATIONINFOLIST_H
8 
9 #include "misc/applicationinfo.h"
10 #include "misc/collection.h"
11 #include "misc/sequence.h"
12 
13 SWIFT_DECLARE_SEQUENCE_MIXINS(swift::misc, CApplicationInfo, CApplicationInfoList)
14 
15 namespace swift::misc
16 {
21  public CSequence<CApplicationInfo>,
22  public mixin::MetaType<CApplicationInfoList>
23  {
24  public:
27 
30 
33 
35  bool containsApplication(CApplicationInfo::Application application) const;
36 
38  int removeApplication(CApplicationInfo::Application application);
39 
41  QStringList processNames() const;
42 
44  int otherSwiftVersionsFromDataDirectories(bool reinit = false);
45 
47  static CApplicationInfoList fromOtherSwiftVersionsFromDataDirectories(bool reinit = false);
48 
50  static const QMap<QString, CApplicationInfo> &applicationDataDirectoryMapWithoutCurrentVersion();
51 
53  static QMap<QString, CApplicationInfo> currentApplicationDataDirectoryMapWithoutCurrentVersion();
54 
56  static bool hasOtherSwiftDataDirectories();
57  };
58 } // namespace swift::misc
59 
60 Q_DECLARE_METATYPE(swift::misc::CApplicationInfoList)
62 
63 #endif // SWIFT_MISC_APPLICATIONINFOLIST_H
Application
Enumeration of application roles.
List of swift application descriptions.
Generic ordered container with value semantics.
Definition: collection.h:107
Generic sequential container with value semantics.
Definition: sequence.h:86
CSequence()=default
Default constructor.
CRTP class template from which a derived class can inherit common methods dealing with the metatype o...
Definition: mixinmetatype.h:29
#define SWIFT_MISC_DECLARE_USING_MIXIN_METATYPE(DERIVED)
When a derived class and a base class both inherit from mixin::MetaType, the derived class uses this ...
Free functions in swift::misc.
#define SWIFT_DECLARE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template declaration of mixins for a CSequence subclass to be placed near the top of the hea...
Definition: sequence.h:62
#define SWIFT_MISC_EXPORT
Export a class or function from the library.