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

ark

  • sources
  • kde-4.14
  • kdeutils
  • ark
  • part
arkviewer.h
Go to the documentation of this file.
1 /*
2  * ark: A program for modifying archives via a GUI.
3  *
4  * Copyright (C) 2004-2008, Henrique Pinto <henrique.pinto@kdemail.net>
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  */
21 
22 #ifndef ARKVIEWER_H
23 #define ARKVIEWER_H
24 
25 #include <KDialog>
26 #include <KMimeType>
27 #include <KParts/BrowserExtension>
28 #include <KParts/ReadOnlyPart>
29 #include <KService>
30 
31 #include <QtCore/QWeakPointer>
32 
33 class ArkViewer : public KDialog
34 {
35  Q_OBJECT
36 
37 public:
38  virtual ~ArkViewer();
39  virtual QSize sizeHint() const;
40 
41  static void view(const QString& fileName, QWidget* parent = 0);
42 
43 protected:
44  virtual void keyPressEvent(QKeyEvent *event);
45 
46 protected slots:
47  void slotOpenUrlRequestDelayed(const KUrl& url, const KParts::OpenUrlArguments& arguments, const KParts::BrowserArguments& browserArguments);
48 
49 private slots:
50  void dialogClosed();
51 
52 private:
53  explicit ArkViewer(QWidget* parent = 0, Qt::WFlags flags = 0);
54 
55  static KService::Ptr getViewer(const KMimeType::Ptr& mimeType);
56  bool viewInInternalViewer(const QString& fileName, const KMimeType::Ptr& mimeType);
57 
58  QWeakPointer<KParts::ReadOnlyPart> m_part;
59  QWidget *m_widget;
60 };
61 
62 #endif // ARKVIEWER_H
63 
QWidget
ArkViewer::view
static void view(const QString &fileName, QWidget *parent=0)
Definition: arkviewer.cpp:89
KDialog
ArkViewer::slotOpenUrlRequestDelayed
void slotOpenUrlRequestDelayed(const KUrl &url, const KParts::OpenUrlArguments &arguments, const KParts::BrowserArguments &browserArguments)
Definition: arkviewer.cpp:246
ArkViewer::sizeHint
virtual QSize sizeHint() const
Definition: arkviewer.cpp:185
QString
Qt::WFlags
typedef WFlags
QSize
ArkViewer
Definition: arkviewer.h:33
QKeyEvent
ArkViewer::~ArkViewer
virtual ~ArkViewer()
Definition: arkviewer.cpp:56
QWeakPointer< KParts::ReadOnlyPart >
ArkViewer::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition: arkviewer.cpp:169
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ark

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

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