Ran qt3to4
[basket4.git] / src / basket_part.h
blob736c379604ec0a97012f7fe0867d08f1afd9e998
1 /***************************************************************************
2 * Copyright (C) 2003 by Petri Damsten *
3 * petri.damsten@iki.fi *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef _BASKETPART_H_
22 #define _BASKETPART_H_
24 #include <kparts/part.h>
25 #include <kparts/factory.h>
27 class QWidget;
28 class QPainter;
29 class KURL;
30 class Q3MultiLineEdit;
31 class BNPView;
33 /**
34 * This is a "Part". It that does all the real work in a KPart
35 * application.
37 * @short Main Part
38 * @author Petri Damsten <petri.damsten@iki.fi>
39 * @version 0.1
41 class BasketPart : public KParts::ReadWritePart
43 Q_OBJECT
44 public:
45 /**
46 * Default constructor
48 BasketPart(QWidget *parentWidget, const char *widgetName,
49 QObject *parent, const char *name, const QStringList &);
51 /**
52 * Destructor
54 virtual ~BasketPart();
56 /**
57 * This is a virtual function inherited from KParts::ReadWritePart.
58 * A shell will use this to inform this Part if it should act
59 * read-only
61 virtual void setReadWrite(bool rw);
63 /**
64 * Reimplemented to disable and enable Save action
66 virtual void setModified(bool modified);
68 static KAboutData *createAboutData();
70 signals:
71 void showPart();
73 protected:
74 /**
75 * This must be implemented by each part
77 virtual bool openFile();
79 /**
80 * This must be implemented by each read-write part
82 virtual bool saveFile();
84 protected slots:
85 void setCaption(const QString &caption);
87 private:
88 BNPView *m_view;
91 #endif // _BASKETPART_H_