swift
iconlist.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 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_ICONLIST_H
7 #define SWIFT_MISC_ICONLIST_H
8 
9 #include <QJsonObject>
10 #include <QMetaType>
11 #include <QString>
12 #include <QtGlobal>
13 
14 #include "misc/collection.h"
15 #include "misc/icon.h"
16 #include "misc/icons.h"
17 #include "misc/sequence.h"
18 #include "misc/swiftmiscexport.h"
19 
21 
22 namespace swift::misc
23 {
27  class SWIFT_MISC_EXPORT CIconList : public CSequence<CIcon>, public mixin::MetaType<CIconList>
28  {
31 
32  public:
34  CIconList() {}
35 
37  CIconList(const CSequence<CIcon> &other);
38 
40  CIcon findByIndex(CIcons::IconIndex index) const;
41 
43  static void registerMetadata();
44  };
45 } // namespace swift::misc
46 
47 Q_DECLARE_METATYPE(swift::misc::CIconList)
49 
50 #endif // SWIFT_MISC_ICONLIST_H
Generic ordered container with value semantics.
Definition: collection.h:107
Value object for icons. An icon is stored in the global icon repository and identified by its index....
Definition: icon.h:39
Icon list (swift standard icons)
Definition: iconlist.h:28
CIconList()
Constructor.
Definition: iconlist.h:34
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Definition: icons.h:32
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.
void registerMetadata()
Register all relevant metadata in 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.