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

kompare

  • sources
  • kde-4.14
  • 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 #include <kompare.h>
25 
26 class KompareInterface;
27 namespace KParts {
28  class ReadOnlyPart;
29  class ReadWritePart;
30 }
31 class KToggleAction;
32 
33 class KSqueezedTextLabel;
34 class KomparePart;
35 class KompareNavTreePart;
36 
37 namespace KTextEditor {
38  class Document;
39  class EditInterface;
40  class View;
41 }
42 
54 class KompareShell : public KParts::MainWindow
55 {
56  Q_OBJECT
57 public:
61  KompareShell();
62 
66  virtual ~KompareShell();
67 
71  void openDiff( const KUrl& url );
72 
76  void openStdin();
77 
81  void compare( const KUrl& source, const KUrl& destination );
82 
86  void blend( const KUrl& url1, const KUrl& diff );
87 
88 public slots:
89  void slotUpdateStatusBar( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
90 
91  KompareInterface* viewPart() const;
92 
93 protected:
94  virtual bool queryClose();
95 
100  void saveProperties(KConfigGroup &);
101 
107  void readProperties(const KConfigGroup &);
108 
109 private slots:
110  void slotSetStatusBarText( const QString& text );
111  void slotFileOpen();
112  void slotFileCompareFiles();
113  void slotFileBlendURLAndDiff();
114  void slotShowTextView();
115  void slotFileClose();
116  void optionsConfigureKeys();
117  void optionsConfigureToolbars();
118  void slotSetDiffString( const QString& diffString );
119  void newToolbarConfig();
120  void slotVisibilityChanged( bool visible );
121 
122 private:
123  void setupAccel();
124  void setupActions();
125  void setupStatusBar();
126 
127 private:
128  KUrl m_sourceURL;
129  KUrl m_destinationURL;
130  KUrl m_diffURL;
131 
132  KParts::ReadWritePart* m_viewPart;
133  KParts::ReadOnlyPart* m_navTreePart;
134  KTextEditor::Document* m_textViewPart;
135  KTextEditor::View* m_textView;
136 // KTextEditor::EditInterface* m_textEditIface;
137 
138  QDockWidget* m_textViewWidget;
139  QDockWidget* m_navTreeDock;
140 
141  KToggleAction* m_showTextView;
142 
143  enum Kompare::Mode m_mode;
144  // This is the statusbarwidget for displaying the general stuff
145  KSqueezedTextLabel* m_generalLabel;
146 
147  QString m_diffString;
148 };
149 
150 #endif // KOMPARE_H
KompareShell::queryClose
virtual bool queryClose()
Definition: kompare_shell.cpp:149
QDockWidget
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:58
KompareNavTreePart
Definition: komparenavtreepart.h:41
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
QString
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:54
KompareShell::KompareShell
KompareShell()
Default Constructor.
Definition: kompare_shell.cpp:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:01 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
  • 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