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

KIO

  • 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
27class KApplicationModelPrivate;
28
32class 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
61class KApplicationViewPrivate;
62
66class 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
KApplicationModel
Definition: kopenwithdialog_p.h:33
KApplicationModel::execFor
QString execFor(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:327
KApplicationModel::data
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: kopenwithdialog.cpp:216
KApplicationModel::parent
virtual QModelIndex parent(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:291
KApplicationModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:309
KApplicationModel::canFetchMore
virtual bool canFetchMore(const QModelIndex &parent) const
Definition: kopenwithdialog.cpp:201
KApplicationModel::KApplicationModelPrivate
friend class KApplicationModelPrivate
Definition: kopenwithdialog_p.h:55
KApplicationModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: kopenwithdialog.cpp:262
KApplicationModel::isDirectory
bool isDirectory(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:336
KApplicationModel::~KApplicationModel
virtual ~KApplicationModel()
Definition: kopenwithdialog.cpp:196
KApplicationModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:276
KApplicationModel::entryPathFor
QString entryPathFor(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:318
KApplicationModel::columnCount
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:210
KApplicationModel::hasChildren
virtual bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:253
KApplicationModel::fetchMore
virtual void fetchMore(const QModelIndex &parent)
Definition: kopenwithdialog.cpp:238
KApplicationView
Definition: kopenwithdialog_p.h:67
KApplicationView::setModel
virtual void setModel(QAbstractItemModel *model)
Definition: kopenwithdialog.cpp:366
KApplicationView::selected
void selected(const QString &_name, const QString &_exec)
KApplicationView::currentChanged
virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous)
Definition: kopenwithdialog.cpp:391
KApplicationView::isDirSel
bool isDirSel() const
Definition: kopenwithdialog.cpp:382
KApplicationView::~KApplicationView
~KApplicationView()
Definition: kopenwithdialog.cpp:361
KApplicationView::highlighted
void highlighted(const QString &_name, const QString &_exec)
KApplicationView::KApplicationViewPrivate
friend class KApplicationViewPrivate
Definition: kopenwithdialog_p.h:89
QAbstractItemModel
QObject
QTreeView
QWidget
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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