~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to kate/app/katemwmodonhddialog.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    This library is free software; you can redistribute it and/or
3
 
    modify it under the terms of the GNU Library General Public
4
 
    License version 2 as published by the Free Software Foundation.
5
 
 
6
 
    This library is distributed in the hope that it will be useful,
7
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
8
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9
 
    Library General Public License for more details.
10
 
 
11
 
    You should have received a copy of the GNU Library General Public License
12
 
    along with this library; see the file COPYING.LIB.  If not, write to
13
 
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
14
 
    Boston, MA 02110-1301, USA.
15
 
 
16
 
    ---
17
 
    Copyright (C) 2004, Anders Lund <anders@alweb.dk>
18
 
*/
19
 
 
20
 
#ifndef _KATE_MW_MODONHD_DIALOG_H_
21
 
#define _KATE_MW_MODONHD_DIALOG_H_
22
 
 
23
 
#include <KTextEditor/Document>
24
 
 
25
 
#include <KDialog>
26
 
 
27
 
#include <QVector>
28
 
 
29
 
#include <QTreeWidget>
30
 
#include <QTreeWidgetItem>
31
 
 
32
 
typedef  QVector<KTextEditor::Document*> DocVector;
33
 
class KProcess;
34
 
class KTemporaryFile;
35
 
 
36
 
/**
37
 
 * A dialog for handling multiple documents modified on disk
38
 
 * from within KateMainWindow
39
 
 */
40
 
class KateMwModOnHdDialog : public KDialog
41
 
{
42
 
    Q_OBJECT
43
 
  public:
44
 
    explicit KateMwModOnHdDialog( DocVector docs, QWidget *parent = 0, const char *name = 0 );
45
 
    ~KateMwModOnHdDialog();
46
 
    void addDocument(KTextEditor::Document *doc);
47
 
 
48
 
  protected Q_SLOTS:
49
 
    void slotUser1();
50
 
    void slotUser2();
51
 
    void slotUser3();
52
 
 
53
 
  private Q_SLOTS:
54
 
    void slotDiff();
55
 
    void slotSelectionChanged(QTreeWidgetItem *current, QTreeWidgetItem *);
56
 
    void slotDataAvailable();
57
 
    void slotPDone();
58
 
 
59
 
  private:
60
 
    enum Action { Ignore, Overwrite, Reload };
61
 
    void handleSelected( int action );
62
 
    class QTreeWidget *twDocuments;
63
 
    class QPushButton *btnDiff;
64
 
    KProcess *m_proc;
65
 
    KTemporaryFile *m_diffFile;
66
 
    QStringList m_stateTexts;
67
 
 
68
 
  protected:
69
 
    virtual void closeEvent( QCloseEvent *e );
70
 
    virtual void keyPressEvent( QKeyEvent* );
71
 
 
72
 
};
73
 
 
74
 
#endif // _KATE_MW_MODONHD_DIALOG_H_
75
 
// kate: space-indent on; indent-width 2; replace-tabs on;