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

kompare

  • sources
  • kde-4.12
  • kdesdk
  • kompare
kompare_shell.h
Go to the documentation of this file.
1 /***************************************************************************
2  kompare_shell.h
3  ----------------
4  begin : Sun Mar 4 2001
5  Copyright 2001-2003 Otto Bruggeman <otto.bruggeman@home.nl>
6  Copyright 2001-2003 John Firebaugh <jfirebaugh@kde.org>
7  Copyright 2007-2011 Kevin Kofler <kevin.kofler@chello.at>
8 ****************************************************************************/
9 
10 /***************************************************************************
11 **
12 ** This program is free software; you can redistribute it and/or modify
13 ** it under the terms of the GNU General Public License as published by
14 ** the Free Software Foundation; either version 2 of the License, or
15 ** (at your option) any later version.
16 **
17 ***************************************************************************/
18 
19 #ifndef KOMPARESHELL_H
20 #define KOMPARESHELL_H
21 
22 #include <kapplication.h>
23 #include <kparts/mainwindow.h>
24 
25 #include "kompare.h"
26 
27 class KompareInterface;
28 namespace KParts {
29  class ReadOnlyPart;
30  class ReadWritePart;
31 }
32 class KToggleAction;
33 
34 class KSqueezedTextLabel;
35 class KomparePart;
36 class KompareNavTreePart;
37 
38 namespace KTextEditor {
39  class Document;
40  class EditInterface;
41  class View;
42 }
43 
55 class KompareShell : public KParts::MainWindow
56 {
57  Q_OBJECT
58 public:
62  KompareShell();
63 
67  virtual ~KompareShell();
68 
72  void openDiff( const KUrl& url );
73 
77  void openStdin();
78 
82  void compare( const KUrl& source, const KUrl& destination );
83 
87  void blend( const KUrl& url1, const KUrl& diff );
88 
89 public slots:
90  void slotUpdateStatusBar( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
91 
92  KompareInterface* viewPart() const;
93 
94 protected:
95  virtual bool queryClose();
96 
101  void saveProperties(KConfigGroup &);
102 
108  void readProperties(const KConfigGroup &);
109 
110 private slots:
111  void slotSetStatusBarText( const QString& text );
112  void slotFileOpen();
113  void slotFileCompareFiles();
114  void slotFileBlendURLAndDiff();
115  void slotShowTextView();
116  void slotFileClose();
117  void optionsConfigureKeys();
118  void optionsConfigureToolbars();
119  void slotSetDiffString( const QString& diffString );
120  void newToolbarConfig();
121  void slotVisibilityChanged( bool visible );
122 
123 private:
124  void setupAccel();
125  void setupActions();
126  void setupStatusBar();
127 
128 private:
129  KUrl m_sourceURL;
130  KUrl m_destinationURL;
131  KUrl m_diffURL;
132 
133  KParts::ReadWritePart* m_viewPart;
134  KParts::ReadOnlyPart* m_navTreePart;
135  KTextEditor::Document* m_textViewPart;
136  KTextEditor::View* m_textView;
137 // KTextEditor::EditInterface* m_textEditIface;
138 
139  QDockWidget* m_textViewWidget;
140  QDockWidget* m_navTreeDock;
141 
142  KToggleAction* m_showTextView;
143 
144  enum Kompare::Mode m_mode;
145  // This is the statusbarwidget for displaying the general stuff
146  KSqueezedTextLabel* m_generalLabel;
147 
148  QString m_diffString;
149 };
150 
151 #endif // KOMPARE_H
KompareShell::queryClose
virtual bool queryClose()
Definition: kompare_shell.cpp:149
KompareShell::blend
void blend(const KUrl &url1, const KUrl &diff)
Use this method to blend diff into url1 (file or directory)
Definition: kompare_shell.cpp:187
KomparePart
This is a "Part".
Definition: kompare_part.h:59
KompareNavTreePart
Definition: komparenavtreepart.h:42
KompareShell::openStdin
void openStdin()
Use this method to load the diff from stdin.
Definition: kompare_shell.cpp:164
KompareInterface
Definition: kompareinterface.h:32
KompareShell::slotUpdateStatusBar
void slotUpdateStatusBar(int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount)
Definition: kompare_shell.cpp:232
KompareShell::saveProperties
void saveProperties(KConfigGroup &)
This method is called when it is time for the app to save its properties for session management purpo...
Definition: kompare_shell.cpp:259
KompareShell::~KompareShell
virtual ~KompareShell()
Default Destructor.
Definition: kompare_shell.cpp:145
KompareShell::readProperties
void readProperties(const KConfigGroup &)
This method is called when this app is restored.
Definition: kompare_shell.cpp:279
KompareShell::viewPart
KompareInterface * viewPart() const
Definition: kompare_shell.cpp:463
KompareShell::compare
void compare(const KUrl &source, const KUrl &destination)
Use this method to compare 2 URLs (files or directories)
Definition: kompare_shell.cpp:179
KompareShell::openDiff
void openDiff(const KUrl &url)
Use this method to load whatever file/URL you have.
Definition: kompare_shell.cpp:157
KompareShell
This is the application "Shell".
Definition: kompare_shell.h:55
KompareShell::KompareShell
KompareShell()
Default Constructor.
Definition: kompare_shell.cpp:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kompare

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

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