• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • core
verificationmodel.h
Go to the documentation of this file.
1 /**************************************************************************
2 * Copyright (C) 2009-2011 Matthias Fuchs <mat69@gmx.net> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
18 ***************************************************************************/
19 
20 #ifndef VERIFICATION_MODEL_H
21 #define VERIFICATION_MODEL_H
22 
23 #include "../kget_export.h"
24 
25 #include <QtCore/QAbstractTableModel>
26 
27 class VerificationModelPrivate;
28 
29 class KGET_EXPORT VerificationModel : public QAbstractTableModel
30 {
31  Q_OBJECT
32 
33  public:
34  VerificationModel(QObject *parent = 0);
35 
36  enum dataType
37  {
38  Type,
39  Checksum,
40  Verified
41  };
42 
43  QVariant data(const QModelIndex &index, int role) const;
44  Qt::ItemFlags flags(const QModelIndex &index) const;
45  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
46  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
47  int rowCount(const QModelIndex &parent = QModelIndex()) const;
48  int columnCount(const QModelIndex &parent = QModelIndex()) const;
49  bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
50 
60  void addChecksum(const QString &type, const QString &checksum, int verified = 0);
61 
69  void addChecksums(const QHash<QString, QString> &checksums);
70 
74  void setVerificationStatus(const QString &type, int verified);
75 
76  private:
77  VerificationModelPrivate *d;
78 
79  friend class VerificationModelPrivate;
80 };
81 
82 #endif
VerificationModel::dataType
dataType
Definition: verificationmodel.h:36
QObject
VerificationModel
Definition: verificationmodel.h:29
KGET_EXPORT
#define KGET_EXPORT
Definition: kget_export.h:24
VerificationModel::Type
Definition: verificationmodel.h:38
QAbstractTableModel
VerificationModel::Checksum
Definition: verificationmodel.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal