kmail

editorwatcher.h
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 KMAIL_EDITORWATCHER_H
20#define KMAIL_EDITORWATCHER_H
21
22#include <kurl.h>
23
24#include <tqdatetime.h>
25#include <tqobject.h>
26#include <tqtimer.h>
27
28class TDEProcess;
29
30namespace KMail {
31
38class EditorWatcher : public TQObject
39{
40 TQ_OBJECT
41
42 public:
50 EditorWatcher( const KURL &url, const TQString &mimeType, bool openWith,
51 TQObject *parent, TQWidget *parentWidget );
52 bool start();
53 bool fileChanged() const { return mFileModified; }
54 signals:
55 void editDone( KMail::EditorWatcher* watcher );
56
57 private slots:
58 void editorExited();
59 void inotifyEvent();
60 void checkEditDone();
61
62 private:
63 KURL mUrl;
64 TQString mMimeType;
65 bool mOpenWith;
66 TDEProcess *mEditor;
67 TQWidget *mParentWidget;
68
69 int mInotifyFd;
70 int mInotifyWatch;
71 bool mHaveInotify;
72
73 bool mFileOpen;
74 bool mEditorRunning;
75
76 bool mFileModified;
77
78 TQTimer mTimer;
79 TQTime mEditTime;
80
81 bool mError;
82 bool mDone;
83};
84
85}
86
87#endif
Starts an editor for the given URL and emits an signal when editing has been finished.
Definition: editorwatcher.h:39
EditorWatcher(const KURL &url, const TQString &mimeType, bool openWith, TQObject *parent, TQWidget *parentWidget)
Constructs an EditorWatcher.
folderdiaquotatab.h
Definition: aboutdata.cpp:40