modems-list-model.h
QAbstractItemModel
QDBusConnection
QDBusObjectPath
sims-list-model.h
lomiri/util/DefinesPtrs.h
memory
connectivity.cpp
modems-list-model.cpp
modems-list-model.h
connectivityqt/sim.h
sims-list-model.h
QAbstractItemModel
QDBusConnection
QDBusObjectPath
QObject
lomiri/util/DefinesPtrs.h
memory
connectivity.cpp
modems-list-model.cpp
modems-list-model.h
connectivityqt::ModemsListModel
connectivityqt

    /*
    *Copyright©2016CanonicalLtd.
    *
    *Thisprogramisfreesoftware:youcanredistributeitand/ormodifyit
    *underthetermsoftheGNULesserGeneralPublicLicenseversion3,
    *aspublishedbytheFreeSoftwareFoundation.
    *
    *Thisprogramisdistributedinthehopethatitwillbeuseful,
    *butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof
    *MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe
    *GNULesserGeneralPublicLicenseformoredetails.
    *
    *YoushouldhavereceivedacopyoftheGNULesserGeneralPublicLicense
    *alongwiththisprogram.Ifnot,see<http://www.gnu.org/licenses/>.
    *
    *Authors:
    *AnttiKaijanmäki<antti.kaijanmaki@canonical.com>
    */

    #pragmaonce

    #include<QAbstractItemModel>
    #include<QDBusConnection>
    #include<QDBusObjectPath>

    #include"sims-list-model.h"

    #include<lomiri/util/DefinesPtrs.h>

    #include<memory>

    namespaceconnectivityqt
    {
    namespaceinternal
    {
    structModemsListModelParameters;
    }

    classQ_DECL_EXPORTModemsListModel:publicQAbstractListModel
    {
    Q_OBJECT

    Q_ENUMS(Roles)

    public:
    LOMIRI_DEFINES_PTRS(ModemsListModel);

    enumRoles
    {
    RoleIndex=Qt::UserRole+1,
    RoleSerial,
    RoleModem,
    RoleSim
    };

    ModemsListModel(constinternal::ModemsListModelParameters&parameters);

    ~ModemsListModel();

    intcolumnCount(constQModelIndex&parent)constoverride;

    introwCount(constQModelIndex&parent)constoverride;

    QVariantdata(constQModelIndex&index,introle)constoverride;

    QHash<int,QByteArray>roleNames()constoverride
    {
    QHash<int,QByteArray>roles;
    roles[RoleIndex]="Index";
    roles[RoleSerial]="Serial";
    roles[RoleModem]="Modem";
    roles[RoleSim]="Sim";
    returnroles;
    }

    publicQ_SLOTS:

    Q_SIGNALS:

    protected:
    classPriv;
    std::shared_ptr<Priv>d;
    };

    }