keximacroview.h
1/* This file is part of the KDE project
2 Copyright (C) 2006 Sebastian Sauer <mail@dipe.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12 You should have received a copy of the GNU Library General Public License
13 along with this library; see the file COPYING.LIB. If not, write to
14 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
15 Boston, MA 02110-1301, USA.
16*/
17
18#ifndef KEXIMACROVIEW_H
19#define KEXIMACROVIEW_H
20
21#include <kexiviewbase.h>
22
23// Forward declarations.
24namespace KoMacro {
25 class Macro;
26}
27namespace KoProperty {
28 class Property;
29}
30namespace KexiDB {
31 class ResultInfo;
32}
33class KexiTableItem;
34
43{
44 TQ_OBJECT
45
46 public:
47
56 KexiMacroView(KexiMainWindow *mainwin, TQWidget *parent, ::KoMacro::Macro* const macro, const char* name = 0);
57
61 virtual ~KexiMacroView();
62
66 TDESharedPtr<KoMacro::Macro> macro() const;
67
72 virtual bool loadData();
73
84 virtual KexiDB::SchemaData* storeNewData(const KexiDB::SchemaData& sdata, bool &cancel);
85
90 virtual tristate storeData(bool dontAsk = false);
91
92 public slots:
93
98 void execute(TQObject* sender = 0);
99
100 protected:
101
118 virtual tristate beforeSwitchTo(int mode, bool& dontstore);
119
132 virtual tristate afterSwitchFrom(int mode);
133
134 private:
136 class Private;
138 Private* const d;
139};
140
141#endif
The KexiMacroView implements KexiViewBase to provide a base KexiView instance for Macros.
void execute(TQObject *sender=0)
This slot will be invoked if Kexi's menuitem Data=>Execute got activated and will execute the Macro.
virtual tristate beforeSwitchTo(int mode, bool &dontstore)
Called by KexiDialogBase::switchToViewMode() right before dialog is switched to new mode.
TDESharedPtr< KoMacro::Macro > macro() const
virtual KexiDB::SchemaData * storeNewData(const KexiDB::SchemaData &sdata, bool &cancel)
Try to call storeData with new data we like to store.
virtual bool loadData()
Load the data from XML source and fill the internally used KoMacro::Macro instance.
virtual tristate storeData(bool dontAsk=false)
Try to store the modified data in the already opened and currently used KexiDB::SchemaData instance.
virtual ~KexiMacroView()
Destructor.
virtual tristate afterSwitchFrom(int mode)
Called by KexiDialogBase::switchToViewMode() right after dialog is switched to new mode.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Base class for single view embeddable of in KexiDialogBase.
The Macro class implements all the action-handling.
Definition macro.h:45
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition tristate.h:100
High-level database connectivity library with database backend drivers.