• 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
  • transfer-plugins
  • checksumsearch
dlgchecksumsearch.h
Go to the documentation of this file.
1 /***************************************************************************
2 * Copyright (C) 2009 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 DLGCHECKSUMSEARCH_H
21 #define DLGCHECKSUMSEARCH_H
22 
23 #include "ui_checksumsearch.h"
24 #include "ui_checksumsearchadddlg.h"
25 
26 #include "checksumsearchtransferdatasource.h"
27 
28 #include <QtGui/QStyledItemDelegate>
29 
30 #include <KCModule>
31 
32 class QSortFilterProxyModel;
33 class QStandardItemModel;
34 class QStringListModel;
35 
36 class ChecksumSearchAddDlg : public KDialog
37 {
38  Q_OBJECT
39 
40  public:
41  ChecksumSearchAddDlg(QStringListModel *modesModel, QStringListModel *typesModel, QWidget *parent = 0, Qt::WFlags flags = 0);
42 
43  signals:
50  void addItem(const QString &change, int mode, const QString &type);
51 
52  private slots:
57  void slotUpdate();
58 
59  void slotAccpeted();
60 
61  private:
62  Ui::ChecksumSearchAddDlg ui;
63 
64  QStringListModel *m_modesModel;
65  QStringListModel *m_typesModel;
66 
67  static const KUrl URL;
68 };
69 
70 class ChecksumDelegate : public QStyledItemDelegate
71 {
72  Q_OBJECT
73 
74  public:
75  ChecksumDelegate(QObject *parent = 0);
76  ChecksumDelegate(QStringListModel *modesModel, QStringListModel *typesModel, QObject *parent = 0);
77 
78  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
79  void setEditorData(QWidget *editor, const QModelIndex &index) const;
80  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
81  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
82 
83  private:
84  QStringListModel *m_modesModel;
85  QStringListModel *m_typesModel;
86 };
87 
88 class DlgChecksumSettingsWidget : public KCModule
89 {
90  Q_OBJECT
91 
92  public:
93  explicit DlgChecksumSettingsWidget(QWidget *parent = 0, const QVariantList &args = QVariantList());
94  ~DlgChecksumSettingsWidget();
95 
96  public slots:
97  void save();
98  void load();
99 
100  private slots:
104  void slotAdd();
105 
109  void slotRemove();
110 
115  void slotUpdate();
116 
124  void slotAddItem(const QString &change, int mode, const QString &type = QString());
125 
126  private:
127  Ui::ChecksumSearch ui;
128  KDialog *m_parent;
129  QStandardItemModel *m_model;
130  QSortFilterProxyModel *m_proxy;
131  QStringList m_modes;
132  QStringListModel *m_modesModel;
133  QStringListModel *m_typesModel;
134 };
135 
136 #endif // DLGCHECKSUMSEARCH_H
ChecksumDelegate::updateEditorGeometry
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: dlgchecksumsearch.cpp:174
checksumsearchtransferdatasource.h
QWidget
QStandardItemModel
KDialog
ChecksumDelegate::setModelData
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: dlgchecksumsearch.cpp:148
ChecksumSearchAddDlg
Definition: dlgchecksumsearch.h:36
QObject
QStyledItemDelegate
ChecksumSearchAddDlg::ChecksumSearchAddDlg
ChecksumSearchAddDlg(QStringListModel *modesModel, QStringListModel *typesModel, QWidget *parent=0, Qt::WFlags flags=0)
Definition: dlgchecksumsearch.cpp:37
DlgChecksumSettingsWidget::~DlgChecksumSettingsWidget
~DlgChecksumSettingsWidget()
Definition: dlgchecksumsearch.cpp:216
ChecksumDelegate::createEditor
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: dlgchecksumsearch.cpp:93
ChecksumDelegate::setEditorData
void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: dlgchecksumsearch.cpp:130
QAbstractItemModel
QSortFilterProxyModel
DlgChecksumSettingsWidget
Definition: dlgchecksumsearch.h:88
DlgChecksumSettingsWidget::load
void load()
Definition: dlgchecksumsearch.cpp:253
ChecksumDelegate
Definition: dlgchecksumsearch.h:70
ChecksumDelegate::ChecksumDelegate
ChecksumDelegate(QObject *parent=0)
Definition: dlgchecksumsearch.cpp:79
DlgChecksumSettingsWidget::DlgChecksumSettingsWidget
DlgChecksumSettingsWidget(QWidget *parent=0, const QVariantList &args=QVariantList())
Definition: dlgchecksumsearch.cpp:180
ChecksumSearchAddDlg::addItem
void addItem(const QString &change, int mode, const QString &type)
Emitted when the dialog gets accepted.
KCModule
DlgChecksumSettingsWidget::save
void save()
Definition: dlgchecksumsearch.cpp:265
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 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