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

kapptemplate

  • sources
  • kde-4.14
  • kdesdk
  • kapptemplate
  • templates
  • C++
  • kpartapp
  • src
%{APPNAMELC}_part.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> *
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 *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
18  ***************************************************************************/
19 
20 #ifndef %{APPNAMEUC}PART_H
21 #define %{APPNAMEUC}PART_H
22 
23 #include <kparts/part.h>
24 
25 class QWidget;
26 class QPainter;
27 class KUrl;
28 class QTextEdit;
29 class KAboutData;
30 class KAction;
31 
40 class %{APPNAME}Part : public KParts::ReadWritePart
41 {
42  Q_OBJECT
43 public:
47  %{APPNAME}Part(QWidget *parentWidget, QObject *parent, const QVariantList &);
48 
52  virtual ~%{APPNAME}Part();
53 
59  virtual void setReadWrite(bool rw);
60 
64  virtual void setModified(bool modified);
65 
66  static KAboutData *createAboutData();
67 
68 protected:
72  virtual bool openFile();
73 
77  virtual bool saveFile();
78  KAction *save;
79 
80 protected slots:
81  void fileSaveAs();
82 
83 private:
84  QTextEdit *m_widget;
85 };
86 
87 #endif // %{APPNAMEUC}PART_H
QWidget
setReadWrite
virtual virtual void setReadWrite(bool rw)
Destructor.
setModified
virtual void setModified(bool modified)
Reimplemented to disable and enable Save action.
createAboutData
static KAboutData * createAboutData()
QObject
openFile
virtual bool openFile()
This must be implemented by each part.
QPainter
Part
class @11 Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
This is a "Part".
m_widget
QTextEdit * m_widget
Definition: %{APPNAMELC}_part.h:84
APPNAME
main APPNAME
saveFile
virtual bool saveFile()
This must be implemented by each read-write part.
save
KAction * save
Definition: %{APPNAMELC}_part.h:78
QTextEdit
fileSaveAs
void fileSaveAs()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kapptemplate

Skip menu "kapptemplate"
  • Main Page
  • 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