kexi

keximainwindow.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
3 Copyright (C) 2003-2005 Jaroslaw Staniek <js@iidea.pl>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KEXIMAINWINDOW_H
22#define KEXIMAINWINDOW_H
23
24#include <tqmap.h>
25#include <tqintdict.h>
26
27#include <tdemdimainfrm.h>
28#include <kexiutils/tristate.h>
29
30#include "kexisharedactionhost.h"
31#include "kexi.h"
32
33class KexiDialogBase;
34class KexiProject;
35namespace KexiPart {
36 class Item;
37}
38
45class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActionHost
46{
47 TQ_OBJECT
48
49 public:
52 PrintItem,
53 PreviewItem,
54 PageSetupForItem
55 };
56
58 virtual ~KexiMainWindow();
59
61 virtual KexiProject *project() = 0;
62
64 virtual void registerChild(KexiDialogBase *dlg) = 0;
65
66 virtual TQPopupMenu* findPopupMenu(const char *popupName) = 0;
67
73 virtual int generatePrivateID() = 0;
74
78 virtual TDEActionPtrList allActions() const = 0;
79
81 virtual KexiDialogBase* currentDialog() const = 0;
82
84 virtual bool userMode() const = 0;
85
86 signals:
90
94
97
98 public slots:
102 virtual bool newObject( KexiPart::Info *info, bool& openingCancelled ) = 0;
103
105 virtual KexiDialogBase * openObject(KexiPart::Item *item, int viewMode,
106 bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0,
107 TQString* errorMessage = 0) = 0;
108
110 virtual KexiDialogBase * openObject(const TQCString& mime, const TQString& name,
111 int viewMode, bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0) = 0;
112
117
119 virtual void acceptPropertySetEditing() = 0;
120
128 virtual void propertySetSwitched(KexiDialogBase *dlg, bool force=false,
129 bool preservePrevSelection = true, const TQCString& propertyToSelect = TQCString()) = 0;
130
138 virtual tristate saveObject( KexiDialogBase *dlg,
139 const TQString& messageWhenAskingForName = TQString(), bool dontAsk = false ) = 0;
140
145 virtual tristate closeDialog(KexiDialogBase *dlg) = 0;
146
160 bool& allowOverwriting, const TQString& messageWhenAskingForName = TQString() ) = 0;
161
165 virtual void highlightObject(const TQCString& mime, const TQCString& name) = 0;
166
170
174
178
181 virtual tristate executeCustomActionForObject(KexiPart::Item* item, const TQString& actionName) = 0;
182
183 protected slots:
184 virtual void slotObjectRenamed(const KexiPart::Item &item, const TQCString& oldName) = 0;
185
186};
187
188
189#endif
190
Base class for child window of Kexi's main application window.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
PrintActionType
Used by printActionForItem().
virtual tristate closeObject(KexiPart::Item *item)=0
virtual int generatePrivateID()=0
virtual tristate closeDialog(KexiDialogBase *dlg)=0
void beforeProjectClosing()
virtual void propertySetSwitched(KexiDialogBase *dlg, bool force=false, bool preservePrevSelection=true, const TQCString &propertyToSelect=TQCString())=0
virtual void acceptPropertySetEditing()=0
virtual void highlightObject(const TQCString &mime, const TQCString &name)=0
virtual tristate saveObject(KexiDialogBase *dlg, const TQString &messageWhenAskingForName=TQString(), bool dontAsk=false)=0
virtual KexiProject * project()=0
Project data of currently opened project or NULL if no project here yet.
virtual tristate getNewObjectInfo(KexiPart::Item *partItem, KexiPart::Part *part, bool &allowOverwriting, const TQString &messageWhenAskingForName=TQString())=0
virtual tristate printItem(KexiPart::Item *item)=0
void acceptProjectClosingRequested(bool &cancel)
virtual bool userMode() const =0
void projectClosed()
Emitted after closing the project.
virtual KexiDialogBase * currentDialog() const =0
virtual bool newObject(KexiPart::Info *info, bool &openingCancelled)=0
virtual KexiDialogBase * openObject(KexiPart::Item *item, int viewMode, bool &openingCancelled, TQMap< TQString, TQString > *staticObjectArgs=0, TQString *errorMessage=0)=0
Opens object pointed by item in a view viewMode.
virtual tristate showPageSetupForItem(KexiPart::Item *item)=0
virtual KexiDialogBase * openObject(const TQCString &mime, const TQString &name, int viewMode, bool &openingCancelled, TQMap< TQString, TQString > *staticObjectArgs=0)=0
For convenience.
virtual tristate printPreviewForItem(KexiPart::Item *item)=0
virtual tristate executeCustomActionForObject(KexiPart::Item *item, const TQString &actionName)=0
virtual TDEActionPtrList allActions() const =0
virtual void registerChild(KexiDialogBase *dlg)=0
Information about a Kexi Part (plugin).
Information about a single object that can be instantiated using Kexi Part.
The main class for kexi frontend parts like tables, queries, forms and reports.
Definition kexipart.h:66
A project's main controller.
Definition kexiproject.h:68
KexiSharedActionHost(TDEMainWindow *mainWin)
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition tristate.h:100