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

messageviewer

  • sources
  • kde-4.12
  • kdepim
  • messageviewer
  • viewer
editorwatcher.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef MESSAGEVIEWER_EDITORWATCHER_H
20 #define MESSAGEVIEWER_EDITORWATCHER_H
21 
22 #include "messageviewer_export.h"
23 #include <kurl.h>
24 
25 #include <qobject.h>
26 #include <qtimer.h>
27 #include <QTime>
28 class KProcess;
29 
30 namespace MessageViewer {
31 
32 
39 class MESSAGEVIEWER_EXPORT EditorWatcher : public QObject
40 {
41  Q_OBJECT
42  public:
43 
51  EditorWatcher( const KUrl &url, const QString &mimeType, bool openWith,
52  QObject *parent, QWidget *parentWidget );
53 
54  bool start();
55  bool fileChanged() const { return mFileModified; }
56  KUrl url() const { return mUrl;}
57  signals:
58  void editDone( MessageViewer::EditorWatcher* watcher );
59 
60  private slots:
61  void editorExited();
62  void inotifyEvent();
63  void checkEditDone();
64 
65  private:
66  KUrl mUrl;
67  QString mMimeType;
68  bool mOpenWith;
69  KProcess *mEditor;
70  QWidget *mParentWidget;
71 
72  int mInotifyFd;
73  int mInotifyWatch;
74  bool mHaveInotify;
75 
76  bool mFileOpen;
77  bool mEditorRunning;
78 
79  bool mFileModified;
80 
81  QTimer mTimer;
82  QTime mEditTime;
83 
84  bool mDone;
85 };
86 
87 }
88 
89 #endif
QWidget
MessageViewer::EditorWatcher
Starts an editor for the given URL and emits an signal when editing has been finished.
Definition: editorwatcher.h:39
QObject
MessageViewer::EditorWatcher::fileChanged
bool fileChanged() const
Definition: editorwatcher.h:55
MESSAGEVIEWER_EXPORT
#define MESSAGEVIEWER_EXPORT
Definition: messageviewer_export.h:37
MessageViewer::EditorWatcher::url
KUrl url() const
Definition: editorwatcher.h:56
messageviewer_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

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

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