kexi

kexidataawareview.h
1/* This file is part of the KDE project
2 Copyright (C) 2005-2007 Jaroslaw Staniek <js@iidea.pl>
3
4 This program 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
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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KEXIDATAAWAREVIEW_H
21#define KEXIDATAAWAREVIEW_H
22
23#include <kexiviewbase.h>
24#include <kexisearchandreplaceiface.h>
25
28
41class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase,
43{
44 TQ_OBJECT
45
46
47 public:
48 KexiDataAwareView(KexiMainWindow *mainWin, TQWidget *parent, const char *name = 0);
49
50 TQWidget* mainWidget();
51
52 virtual TQSize minimumSizeHint() const;
53
54 virtual TQSize sizeHint() const;
55
56 KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; }
57
60 virtual bool setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions,
61 TQString& currentColumnName);
62
65 virtual tristate find(const TQVariant& valueToFind,
66 const KexiSearchAndReplaceViewInterface::Options& options, bool next);
67
70 virtual tristate findNextAndReplace(const TQVariant& valueToFind,
71 const TQVariant& replacement,
72 const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll);
73
74 public slots:
75 void deleteAllRows();
76 void deleteCurrentRow();
77 void deleteAndStartEditCurrentCell();
78 void startEditOrToggleValue();
79 bool acceptRowEdit();
80 void cancelRowEdit();
81 void sortAscending();
82 void sortDescending();
83 void copySelection();
84 void cutSelection();
85 void paste();
86 void slotGoToFirstRow();
87 void slotGoToPreviusRow();
88 void slotGoToNextRow();
89 void slotGoToLastRow();
90 void slotGoToNewRow();
91/* void editFind();
92 void slotFind();
93 void editFindNext();
94 void editFindPrevious();
95 void editReplace();*/
96
97 protected slots:
98// void slotCellSelected(const TQVariant& v); //!< @internal
99 void slotCellSelected(int col, int row);
100 void reloadActions();
101 void slotUpdateRowActions(int row);
102 void slotClosing(bool& cancel);
103
104 protected:
105 void init( TQWidget* viewWidget, KexiSharedActionClient* actionClient,
106 KexiDataAwareObjectInterface* dataAwareObject,
107 // temporary, for KexiFormView in design mode
108 bool noDataAware = false
109 );
110 void initActions();
111 virtual void updateActions(bool activated);
112
113 TQWidget* m_internalView;
114 KexiSharedActionClient* m_actionClient;
115 KexiDataAwareObjectInterface* m_dataAwareObject;
116};
117
118#endif
The KexiDataAwareObjectInterface is an interface for record-based data object.
Provides a view displaying record-based data.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Specifies options for find and replace operations.
An interface used by Kexi views (KexiViewBase) supporting search/replace features.
virtual bool setupFindAndReplace(TQStringList &columnNames, TQStringList &columnCaptions, TQString &currentColumnName)=0
virtual tristate findNextAndReplace(const TQVariant &valueToFind, const TQVariant &replacement, const KexiSearchAndReplaceViewInterface::Options &options, bool replaceAll)=0
virtual tristate find(const TQVariant &valueToFind, const KexiSearchAndReplaceViewInterface::Options &options, bool next)=0
The KexiSharedActionClient is an interface using application-wide (shared) actions.
Base class for single view embeddable of in KexiDialogBase.
virtual void updateActions(bool activated)
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition tristate.h:100