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

akregator

  • sources
  • kde-4.14
  • kdepim
  • akregator
  • src
browserframe_p.h
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of Qt, and distribute the resulting executable,
22  without including the source code for Qt in the source distribution.
23 */
24 
25 #ifndef AKREGATOR_BROWSERFRAME_P_H
26 #define AKREGATOR_BROWSERFRAME_P_H
27 
28 
29 // TODO: cleanup unneeded includes
30 
31 #include "actionmanager.h"
32 #include "browserframe.h"
33 #include "openurlrequest.h"
34 
35 #include <QAction>
36 #include <QGridLayout>
37 #include <QList>
38 #include <QPointer>
39 #include <QString>
40 
41 #include <kaction.h>
42 #include <kdebug.h>
43 #include <klibloader.h>
44 #include <kmenu.h>
45 #include <kmimetypetrader.h>
46 #include <ktoolbarpopupaction.h>
47 #include <kurl.h>
48 #include <kxmlguiclient.h>
49 #include <kparts/browserextension.h>
50 #include <kparts/part.h>
51 
52 namespace Akregator {
53 
54 class BrowserFrame::Private : public QObject
55 {
56  Q_OBJECT
57 
58  BrowserFrame* const q;
59 
60  public:
61  explicit Private(BrowserFrame* qq);
62  ~Private();
63 
64  class HistoryEntry;
65  class HistoryAction;
66 
67  QList<HistoryEntry> history;
68  QList<HistoryEntry>::Iterator current;
69  QPointer<KParts::ReadOnlyPart> part;
70  QPointer<KParts::BrowserExtension> extension;
71  QPointer<QGridLayout> layout;
72  bool lockHistory;
73  bool isLoading;
74 
75  QString mimetype;
76  KService::Ptr service;
77 
78  void connectPart();
79  void updateHistoryEntry();
80  void appendHistoryEntry(const KUrl& url);
81  void restoreHistoryEntry(const QList<HistoryEntry>::Iterator& entry);
82  bool loadPartForMimetype(const QString& mimetype);
83 
84  public slots:
85  void slotHistoryEntrySelected( const QList<BrowserFrame::Private::HistoryEntry>::Iterator& entry)
86  {
87  restoreHistoryEntry(entry);
88  }
89  void partDestroyed( QObject* obj );
90 };
91 
92 class BrowserFrame::Private::HistoryEntry
93 {
94  public:
95 
96  KUrl url;
97  QString title;
98  QByteArray buffer;
99  int id;
100  QString mimetype;
101  QString strServiceName;
102  QByteArray postData;
103  QString postContentType;
104  bool doPost;
105  QString pageReferrer;
106 
107  HistoryEntry() : id(idCounter++) {}
108 
109  bool operator==(const HistoryEntry& other) const
110  {
111  return id == other.id;
112  }
113 
114  bool operator!=(const HistoryEntry& other) const
115  {
116  return id != other.id;
117  }
118 
119  static int idCounter;
120 };
121 
122 class BrowserFrame::Private::HistoryAction : public QAction
123 {
124 
125  Q_OBJECT
126  public:
127  HistoryAction(QList<HistoryEntry>::Iterator entry,
128  QObject* q,
129  Private* priv);
130 
131  QList<HistoryEntry>::Iterator m_entry;
132 
133  public slots:
134 
135  void slotTriggered(bool);
136 
137  signals:
138 
139  void triggered(const QList<BrowserFrame::Private::HistoryEntry>::Iterator&);
140 };
141 
142 } // namespace Akregator
143 
144 #endif // AKREGATOR_BROWSERFRAME_P_H
Akregator::BrowserFrame::Private::HistoryEntry::idCounter
static int idCounter
Definition: browserframe_p.h:119
Akregator::BrowserFrame::Private::HistoryEntry::HistoryEntry
HistoryEntry()
Definition: browserframe_p.h:107
Akregator::BrowserFrame::Private::loadPartForMimetype
bool loadPartForMimetype(const QString &mimetype)
Akregator::BrowserFrame::Private::HistoryEntry::pageReferrer
QString pageReferrer
Definition: browserframe_p.h:105
openurlrequest.h
Akregator::BrowserFrame::Private::HistoryEntry::strServiceName
QString strServiceName
Definition: browserframe_p.h:101
QByteArray
QPointer< KParts::ReadOnlyPart >
browserframe.h
Akregator::BrowserFrame::Private::partDestroyed
void partDestroyed(QObject *obj)
actionmanager.h
Akregator::BrowserFrame::Private::lockHistory
bool lockHistory
Definition: browserframe_p.h:72
Akregator::BrowserFrame::Private::~Private
~Private()
Akregator::BrowserFrame::Private::Private
Private(BrowserFrame *qq)
Akregator::BrowserFrame::Private::slotHistoryEntrySelected
void slotHistoryEntrySelected(const QList< BrowserFrame::Private::HistoryEntry >::Iterator &entry)
Definition: browserframe_p.h:85
Akregator::BrowserFrame::Private::HistoryEntry::title
QString title
Definition: browserframe_p.h:97
Akregator::BrowserFrame::Private
Definition: browserframe_p.h:54
Akregator::BrowserFrame::Private::HistoryAction::triggered
void triggered(const QList< BrowserFrame::Private::HistoryEntry >::Iterator &)
Akregator::BrowserFrame::Private::HistoryAction::slotTriggered
void slotTriggered(bool)
Akregator::BrowserFrame::Private::HistoryEntry::operator==
bool operator==(const HistoryEntry &other) const
Definition: browserframe_p.h:109
QObject
Akregator::BrowserFrame::Private::layout
QPointer< QGridLayout > layout
Definition: browserframe_p.h:71
Akregator::BrowserFrame::Private::HistoryAction::HistoryAction
HistoryAction(QList< HistoryEntry >::Iterator entry, QObject *q, Private *priv)
Akregator::BrowserFrame::Private::HistoryEntry::url
KUrl url
Definition: browserframe_p.h:96
Akregator::BrowserFrame::Private::HistoryEntry::mimetype
QString mimetype
Definition: browserframe_p.h:100
Akregator::BrowserFrame::Private::HistoryEntry::buffer
QByteArray buffer
Definition: browserframe_p.h:98
Akregator::BrowserFrame::Private::history
QList< HistoryEntry > history
Definition: browserframe_p.h:65
Akregator::BrowserFrame::Private::HistoryEntry
Definition: browserframe_p.h:92
Akregator::BrowserFrame::Private::restoreHistoryEntry
void restoreHistoryEntry(const QList< HistoryEntry >::Iterator &entry)
QString
QList
Definition: article.h:41
Akregator::BrowserFrame::Private::HistoryEntry::postData
QByteArray postData
Definition: browserframe_p.h:102
Akregator::BrowserFrame::Private::mimetype
QString mimetype
Definition: browserframe_p.h:75
Akregator::BrowserFrame::Private::extension
QPointer< KParts::BrowserExtension > extension
Definition: browserframe_p.h:70
Akregator::BrowserFrame::Private::appendHistoryEntry
void appendHistoryEntry(const KUrl &url)
Akregator::BrowserFrame::Private::current
QList< HistoryEntry >::Iterator current
Definition: browserframe_p.h:68
Akregator::BrowserFrame::Private::HistoryAction
Definition: browserframe_p.h:122
Akregator::BrowserFrame::Private::connectPart
void connectPart()
Akregator::BrowserFrame::Private::HistoryEntry::id
int id
Definition: browserframe_p.h:99
Akregator::BrowserFrame::Private::part
QPointer< KParts::ReadOnlyPart > part
Definition: browserframe_p.h:69
Akregator::BrowserFrame::Private::HistoryEntry::postContentType
QString postContentType
Definition: browserframe_p.h:103
Akregator::BrowserFrame::Private::HistoryEntry::doPost
bool doPost
Definition: browserframe_p.h:104
QAction
Akregator::BrowserFrame::Private::isLoading
bool isLoading
Definition: browserframe_p.h:73
Akregator::BrowserFrame::Private::HistoryEntry::operator!=
bool operator!=(const HistoryEntry &other) const
Definition: browserframe_p.h:114
Akregator::BrowserFrame::Private::HistoryAction::m_entry
QList< HistoryEntry >::Iterator m_entry
Definition: browserframe_p.h:131
Akregator::BrowserFrame
Definition: browserframe.h:49
Akregator::BrowserFrame::url
KUrl url() const
returns the URL of the embedded part
Definition: browserframe.cpp:65
Akregator::BrowserFrame::Private::updateHistoryEntry
void updateHistoryEntry()
Akregator::BrowserFrame::Private::service
KService::Ptr service
Definition: browserframe_p.h:76
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akregator

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

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