LeechCraft  0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
structures.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <memory>
12 #include <QMetaType>
13 #include <QVariant>
14 #include <QString>
15 #include "maxvalue.h"
16 
17 class QMenu;
18 class QIODevice;
19 
20 namespace LC
21 {
25  {
29 
33 
37 
42 
46 
50 
54  Internal = 64,
55 
60 
65 
69  OnlyHandle = 512,
70 
74  OnlyDownload = 1024,
75 
79  AutoAccept = 2048,
80 
85  };
86 
87  Q_DECLARE_FLAGS (TaskParameters, TaskParameter);
88 
96  struct Entity
97  {
113  QVariant Entity_;
114 
123  QString Location_;
124 
149  QString Mime_;
150 
153  TaskParameters Parameters_ = NoParameters;
154 
166  };
167 
174  enum class CustomDataRoles
175  {
179  Tags = Qt::UserRole + 100,
180  };
181 
182  constexpr int operator+ (CustomDataRoles role) noexcept
183  {
184  return static_cast<int> (role);
185  }
186 
187  template<>
189 
190  enum class Priority
191  {
192  Info,
193  Warning,
194  Critical
195  };
196 };
197 
198 typedef std::shared_ptr<QObject> QObject_ptr;
199 
202 Q_DECLARE_METATYPE (LC::TaskParameters)
204 Q_DECLARE_OPERATORS_FOR_FLAGS (LC::TaskParameters)
CustomDataRoles
Definition: structures.h:174
TaskParameter
Describes single task parameter.
Definition: structures.h:24
std::shared_ptr< QObject > QObject_ptr
Definition: structures.h:196
constexpr int operator+(JobHolderRole role) noexcept
Definition: ijobholder.h:91
QString Mime_
MIME type of the entity.
Definition: structures.h:149
TaskParameters Parameters_
Parameters of this task.
Definition: structures.h:153
QVariant Entity_
The entity that this object represents.
Definition: structures.h:113
QMap< QString, QVariant > Additional_
Additional parameters.
Definition: structures.h:165
Priority
Definition: structures.h:190
Q_DECLARE_METATYPE(QVariantList *)
auto Tup2 &&tup2 noexcept
Definition: ctstringutils.h:68
A message used for inter-plugin communication.
Definition: structures.h:96
QString Location_
Source or destination.
Definition: structures.h:123
constexpr int MaxValue< CustomDataRoles >
Definition: structures.h:188
Q_DECLARE_FLAGS(TabFeatures, LC::TabFeature)