annotate kdiff3/src-QT4/kdiff3_part.h @ 113:7bca1f1340f6 tip

Build fixes for Xcode 10 / Qt 5.12
author Chris Cannam
date Mon, 17 Dec 2018 11:13:01 +0000
parents fcd146072e0c
children
rev   line source
joachim99@69 1 /***************************************************************************
joachim99@77 2 * Copyright (C) 2003-2007 Joachim Eibl <joachim.eibl at gmx.de> *
joachim99@69 3 * *
joachim99@69 4 * This program is free software; you can redistribute it and/or modify *
joachim99@69 5 * it under the terms of the GNU General Public License as published by *
joachim99@69 6 * the Free Software Foundation; either version 2 of the License, or *
joachim99@69 7 * (at your option) any later version. *
joachim99@69 8 * *
joachim99@69 9 * This program is distributed in the hope that it will be useful, *
joachim99@69 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
joachim99@69 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
joachim99@69 12 * GNU General Public License for more details. *
joachim99@69 13 * *
joachim99@69 14 * You should have received a copy of the GNU General Public License *
joachim99@69 15 * along with this program; if not, write to the *
joachim99@69 16 * Free Software Foundation, Inc., *
joachim99@69 17 * 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
joachim99@69 18 ***************************************************************************/
joachim99@8 19
joachim99@8 20 #ifndef _KDIFF3PART_H_
joachim99@8 21 #define _KDIFF3PART_H_
joachim99@8 22
joachim99@8 23 #include <kparts/part.h>
joachim99@8 24 #include <kparts/factory.h>
joachim99@8 25
joachim99@8 26 class QWidget;
joachim99@8 27 class KDiff3App;
joachim99@8 28
joachim99@8 29 /**
joachim99@8 30 * This is a "Part". It that does all the real work in a KPart
joachim99@8 31 * application.
joachim99@8 32 *
joachim99@8 33 * @short Main Part
joachim99@69 34 * @author Joachim Eibl <joachim.eibl at gmx.de>
joachim99@8 35 */
joachim99@80 36 class KDiff3Part : public KParts::ReadWritePart
joachim99@8 37 {
joachim99@8 38 Q_OBJECT
joachim99@8 39 public:
joachim99@8 40 /**
joachim99@8 41 * Default constructor
joachim99@8 42 */
joachim99@8 43 KDiff3Part(QWidget *parentWidget, const char *widgetName,
joachim99@80 44 QObject *parent );
joachim99@8 45
joachim99@8 46 /**
joachim99@8 47 * Destructor
joachim99@8 48 */
joachim99@8 49 virtual ~KDiff3Part();
joachim99@8 50
joachim99@8 51 /**
joachim99@8 52 * This is a virtual function inherited from KParts::ReadWritePart.
joachim99@8 53 * A shell will use this to inform this Part if it should act
joachim99@8 54 * read-only
joachim99@8 55 */
joachim99@8 56 virtual void setReadWrite(bool rw);
joachim99@8 57
joachim99@8 58 /**
joachim99@8 59 * Reimplemented to disable and enable Save action
joachim99@8 60 */
joachim99@8 61 virtual void setModified(bool modified);
joachim99@8 62
joachim99@8 63 protected:
joachim99@8 64 /**
joachim99@8 65 * This must be implemented by each part
joachim99@8 66 */
joachim99@8 67 virtual bool openFile();
joachim99@8 68
joachim99@8 69 /**
joachim99@8 70 * This must be implemented by each read-write part
joachim99@8 71 */
joachim99@8 72 virtual bool saveFile();
joachim99@8 73
joachim99@8 74 private:
joachim99@8 75 KDiff3App* m_widget;
joachim99@8 76 bool m_bIsShell;
joachim99@8 77 };
joachim99@8 78
joachim99@80 79 class KComponentData;
joachim99@8 80 class KAboutData;
joachim99@8 81
joachim99@8 82 class KDiff3PartFactory : public KParts::Factory
joachim99@8 83 {
joachim99@8 84 Q_OBJECT
joachim99@8 85 public:
joachim99@8 86 KDiff3PartFactory();
joachim99@8 87 virtual ~KDiff3PartFactory();
joachim99@80 88 virtual KParts::Part* createPartObject( QWidget *parentWidget,
joachim99@80 89 QObject *parent,
joachim99@80 90 const char *classname,
joachim99@80 91 const QStringList &args );
joachim99@80 92 static KComponentData* instance();
joachim99@8 93
joachim99@8 94 private:
joachim99@80 95 static KComponentData* s_instance;
joachim99@8 96 static KAboutData* s_about;
joachim99@8 97 };
joachim99@8 98
joachim99@8 99 #endif // _KDIFF3PART_H_