Plasma5Support

setupdevicejob.h
1/*
2 SPDX-FileCopyrightText: 2008 Alex Merry <alex.merry@kdemail.net>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6#pragma once
7
8#include "modeljob.h"
9
10class SetupDeviceJob : public ModelJob
11{
13
14public:
15 SetupDeviceJob(KFilePlacesModel *model, QModelIndex index, QObject *parent = nullptr)
16 : ModelJob(parent, model, index, QStringLiteral("Setup Device"))
17 {
18 connect(model, &KFilePlacesModel::setupDone, this, &SetupDeviceJob::setupDone);
19 connect(model, &KFilePlacesModel::errorMessage, this, &SetupDeviceJob::setupError);
20 }
21
22 void start() override
23 {
24 m_model->requestSetup(m_index);
25 }
26
27private Q_SLOTS:
28 void setupDone(const QModelIndex &index, bool success);
29 void setupError(const QString &message);
30};
Q_INVOKABLE void requestSetup(const QModelIndex &index)
void setupDone(const QModelIndex &index, bool success)
void errorMessage(const QString &message)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.