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

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kfile
kopenwithdialog_p.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 David Faure <faure@kde.org>
3  Copyright (C) 2007 Pino Toscano <pino@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef OPENWITHDIALOG_P_H
22 #define OPENWITHDIALOG_P_H
23 
24 #include <QtCore/QAbstractItemModel>
25 #include <QtGui/QTreeView>
26 
27 class KApplicationModelPrivate;
28 
32 class KApplicationModel : public QAbstractItemModel
33 {
34  Q_OBJECT
35 
36  public:
37  KApplicationModel(QObject *parent = 0);
38  virtual ~KApplicationModel();
39  virtual bool canFetchMore(const QModelIndex &parent) const;
40  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
41  virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
42  virtual void fetchMore(const QModelIndex &parent);
43 // virtual Qt::ItemFlags flags(const QModelIndex &index) const;
44  virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
45  virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
46  virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
47  virtual QModelIndex parent(const QModelIndex &index) const;
48  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
49 
50  QString entryPathFor(const QModelIndex &index) const;
51  QString execFor(const QModelIndex &index) const;
52  bool isDirectory(const QModelIndex &index) const;
53 
54  private:
55  friend class KApplicationModelPrivate;
56  KApplicationModelPrivate *const d;
57 
58  Q_DISABLE_COPY(KApplicationModel)
59 };
60 
61 class KApplicationViewPrivate;
62 
66 class KApplicationView : public QTreeView
67 {
68  Q_OBJECT
69 
70  public:
71  KApplicationView(QWidget *parent = 0);
72  ~KApplicationView();
73 
74  virtual void setModel(QAbstractItemModel *model);
75 
76  bool isDirSel() const;
77 
78  Q_SIGNALS:
79  void selected(const QString &_name, const QString &_exec);
80  void highlighted(const QString &_name, const QString &_exec);
81 
82  protected Q_SLOTS:
83  virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous);
84 
85  private Q_SLOTS:
86  void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
87 
88  private:
89  friend class KApplicationViewPrivate;
90  KApplicationViewPrivate *const d;
91 
92  Q_DISABLE_COPY(KApplicationView)
93 };
94 
95 #endif
QVariant
KApplicationModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: kopenwithdialog.cpp:262
KApplicationModel::entryPathFor
QString entryPathFor(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:318
KApplicationModel::hasChildren
virtual bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:253
QWidget
KApplicationView::isDirSel
bool isDirSel() const
Definition: kopenwithdialog.cpp:382
QString
KApplicationModel::data
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: kopenwithdialog.cpp:216
QObject
KApplicationModel::columnCount
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:210
KApplicationModel::KApplicationModelPrivate
friend class KApplicationModelPrivate
Definition: kopenwithdialog_p.h:55
KApplicationModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:309
QTreeView
KApplicationModel::parent
virtual QModelIndex parent(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:291
KApplicationView
Definition: kopenwithdialog_p.h:66
KApplicationModel::execFor
QString execFor(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:327
KApplicationModel::canFetchMore
virtual bool canFetchMore(const QModelIndex &parent) const
Definition: kopenwithdialog.cpp:201
QAbstractItemModel
KApplicationModel::isDirectory
bool isDirectory(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:336
KApplicationModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:276
KApplicationView::highlighted
void highlighted(const QString &_name, const QString &_exec)
KApplicationView::KApplicationView
KApplicationView(QWidget *parent=0)
Definition: kopenwithdialog.cpp:356
KApplicationView::selected
void selected(const QString &_name, const QString &_exec)
KApplicationView::~KApplicationView
~KApplicationView()
Definition: kopenwithdialog.cpp:361
KApplicationView::KApplicationViewPrivate
friend class KApplicationViewPrivate
Definition: kopenwithdialog_p.h:89
KApplicationView::currentChanged
virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous)
Definition: kopenwithdialog.cpp:391
KApplicationModel::KApplicationModel
KApplicationModel(QObject *parent=0)
Definition: kopenwithdialog.cpp:190
KApplicationModel::~KApplicationModel
virtual ~KApplicationModel()
Definition: kopenwithdialog.cpp:196
KApplicationModel
Definition: kopenwithdialog_p.h:32
KApplicationModel::fetchMore
virtual void fetchMore(const QModelIndex &parent)
Definition: kopenwithdialog.cpp:238
KApplicationView::setModel
virtual void setModel(QAbstractItemModel *model)
Definition: kopenwithdialog.cpp:366
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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