Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F114750
upload-job-model.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1015 B
Referenced Files
None
Subscribers
None
upload-job-model.hpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2023 nannanko <nannanko@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
<kazv-defs.hpp>
#include
"kazv-io-job.hpp"
#include
<QAbstractListModel>
#include
<QtQml>
#include
<QVariant>
#include
<QModelIndex>
#include
<QHash>
#include
<QByteArray>
#include
<memory>
struct
UploadJobModelPrivate
;
class
UploadJobModel
:
public
QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
std
::
unique_ptr
<
UploadJobModelPrivate
>
m_d
;
public
:
enum
Roles
{
JobRole
=
Qt
::
UserRole
+
1
,
};
UploadJobModel
(
QObject
*
parent
=
nullptr
);
~
UploadJobModel
()
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
override
;
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
void
addJob
(
QPointer
<
KazvIOUploadJob
>
job
);
void
removeJob
(
QPointer
<
KazvIOUploadJob
>
job
);
void
clearJobs
();
};
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Nov 26, 2:18 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40374
Default Alt Text
upload-job-model.hpp (1015 B)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment