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

akregator

  • sources
  • kde-4.12
  • 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  class UrlAction;
67 
68  QList<HistoryEntry> history;
69  QList<HistoryEntry>::Iterator current;
70  QPointer<KParts::ReadOnlyPart> part;
71  QPointer<KParts::BrowserExtension> extension;
72  QPointer<QGridLayout> layout;
73  bool lockHistory;
74  bool isLoading;
75 
76  QString mimetype;
77  KService::Ptr service;
78 
79  void connectPart();
80  void updateHistoryEntry();
81  void appendHistoryEntry(const KUrl& url);
82  void restoreHistoryEntry(const QList<HistoryEntry>::Iterator& entry);
83  bool loadPartForMimetype(const QString& mimetype);
84 
85  public slots:
86  void slotHistoryEntrySelected( const QList<BrowserFrame::Private::HistoryEntry>::Iterator& entry)
87  {
88  restoreHistoryEntry(entry);
89  }
90  void partDestroyed( QObject* obj );
91 };
92 
93 class BrowserFrame::Private::HistoryEntry
94 {
95  public:
96 
97  KUrl url;
98  QString title;
99  QByteArray buffer;
100  int id;
101  QString mimetype;
102  QString strServiceName;
103  QByteArray postData;
104  QString postContentType;
105  bool doPost;
106  QString pageReferrer;
107 
108  HistoryEntry() : id(idCounter++) {}
109 
110  bool operator==(const HistoryEntry& other) const
111  {
112  return id == other.id;
113  }
114 
115  bool operator!=(const HistoryEntry& other) const
116  {
117  return id != other.id;
118  }
119 
120  static int idCounter;
121 };
122 
123 class BrowserFrame::Private::HistoryAction : public QAction
124 {
125 
126  Q_OBJECT
127  public:
128  HistoryAction(QList<HistoryEntry>::Iterator entry,
129  QObject* q,
130  Private* priv);
131 
132  QList<HistoryEntry>::Iterator m_entry;
133 
134  public slots:
135 
136  void slotTriggered(bool);
137 
138  signals:
139 
140  void triggered(const QList<BrowserFrame::Private::HistoryEntry>::Iterator&);
141 };
142 
143 } // namespace Akregator
144 
145 #endif // AKREGATOR_BROWSERFRAME_P_H
Akregator::BrowserFrame::Private::HistoryEntry::idCounter
static int idCounter
Definition: browserframe_p.h:120
Akregator::BrowserFrame::Private::HistoryEntry::HistoryEntry
HistoryEntry()
Definition: browserframe_p.h:108
Akregator::BrowserFrame::Private::loadPartForMimetype
bool loadPartForMimetype(const QString &mimetype)
Akregator::BrowserFrame::Private::HistoryEntry::pageReferrer
QString pageReferrer
Definition: browserframe_p.h:106
openurlrequest.h
Akregator::BrowserFrame::Private::HistoryEntry::strServiceName
QString strServiceName
Definition: browserframe_p.h:102
browserframe.h
Akregator::BrowserFrame::Private::partDestroyed
void partDestroyed(QObject *obj)
actionmanager.h
QObject
Akregator::BrowserFrame::Private::lockHistory
bool lockHistory
Definition: browserframe_p.h:73
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:86
Akregator::BrowserFrame::Private::HistoryEntry::title
QString title
Definition: browserframe_p.h:98
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:110
Akregator::BrowserFrame::Private::layout
QPointer< QGridLayout > layout
Definition: browserframe_p.h:72
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:97
Akregator::BrowserFrame::Private::HistoryEntry::mimetype
QString mimetype
Definition: browserframe_p.h:101
Akregator::BrowserFrame::Private::HistoryEntry::buffer
QByteArray buffer
Definition: browserframe_p.h:99
Akregator::BrowserFrame::Private::history
QList< HistoryEntry > history
Definition: browserframe_p.h:66
Akregator::BrowserFrame::Private::HistoryEntry
Definition: browserframe_p.h:93
Akregator::BrowserFrame::Private::restoreHistoryEntry
void restoreHistoryEntry(const QList< HistoryEntry >::Iterator &entry)
Akregator::BrowserFrame::Private::HistoryEntry::postData
QByteArray postData
Definition: browserframe_p.h:103
Akregator::BrowserFrame::Private::mimetype
QString mimetype
Definition: browserframe_p.h:76
Akregator::BrowserFrame::Private::extension
QPointer< KParts::BrowserExtension > extension
Definition: browserframe_p.h:71
Akregator::BrowserFrame::Private::appendHistoryEntry
void appendHistoryEntry(const KUrl &url)
Akregator::BrowserFrame::Private::current
QList< HistoryEntry >::Iterator current
Definition: browserframe_p.h:69
Akregator::BrowserFrame::Private::HistoryAction
Definition: browserframe_p.h:123
Akregator::BrowserFrame::Private::connectPart
void connectPart()
Akregator::BrowserFrame::Private::HistoryEntry::id
int id
Definition: browserframe_p.h:100
Akregator::BrowserFrame::Private::part
QPointer< KParts::ReadOnlyPart > part
Definition: browserframe_p.h:70
Akregator::BrowserFrame::Private::HistoryEntry::postContentType
QString postContentType
Definition: browserframe_p.h:104
Akregator::BrowserFrame::Private::HistoryEntry::doPost
bool doPost
Definition: browserframe_p.h:105
Akregator::BrowserFrame::Private::isLoading
bool isLoading
Definition: browserframe_p.h:74
Akregator::BrowserFrame::Private::HistoryEntry::operator!=
bool operator!=(const HistoryEntry &other) const
Definition: browserframe_p.h:115
Akregator::BrowserFrame::Private::HistoryAction::m_entry
QList< HistoryEntry >::Iterator m_entry
Definition: browserframe_p.h:132
Akregator::BrowserFrame
Definition: browserframe.h:49
Akregator::BrowserFrame::url
KUrl url() const
returns the URL of the embedded part
Definition: browserframe.cpp:66
Akregator::BrowserFrame::Private::updateHistoryEntry
void updateHistoryEntry()
QAction
QList
Definition: article.h:39
Akregator::BrowserFrame::Private::service
KService::Ptr service
Definition: browserframe_p.h:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:14 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

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