Changeset View
Changeset View
Standalone View
Standalone View
kexi/plugins/queries/kexiquerypart.h
1 | /* This file is part of the KDE project | 1 | /* This file is part of the KDE project | ||
---|---|---|---|---|---|
2 | Copyright (C) 2003 Lucijan Busch <lucijan@kde.org> | 2 | Copyright (C) 2003 Lucijan Busch <lucijan@kde.org> | ||
3 | Copyright (C) 2004-2010 Jarosław Staniek <staniek@kde.org> | 3 | Copyright (C) 2004-2016 Jarosław Staniek <staniek@kde.org> | ||
4 | 4 | | |||
5 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public | ||
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either | ||
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. | ||
9 | 9 | | |||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 54 | public: | |||
74 | 74 | | |||
75 | //! Takes query associated with this data (without deleting) and returns it. | 75 | //! Takes query associated with this data (without deleting) and returns it. | ||
76 | //! After this call query() == 0 | 76 | //! After this call query() == 0 | ||
77 | KexiDB::QuerySchema *takeQuery(); | 77 | KexiDB::QuerySchema *takeQuery(); | ||
78 | 78 | | |||
79 | //! Connection used for retrieving definition of the query | 79 | //! Connection used for retrieving definition of the query | ||
80 | KexiDB::Connection *conn; | 80 | KexiDB::Connection *conn; | ||
81 | 81 | | |||
82 | /*! @return true if \a query member has changed in previous view. | 82 | /*! @return view mode if which the query member has changed. | ||
83 | It's possibly one of previously visited views. Kexi::NoViewMode is the default, | ||||
84 | what means that query was not changed. | ||||
83 | Used on view switching. We're checking this flag to see if we should | 85 | Used on view switching. We're checking this flag to see if we should | ||
84 | rebuild internal structure for DesignViewMode of regenerated sql text | 86 | rebuild internal structure for DesignViewMode of regenerated sql text | ||
85 | in TextViewMode after switch from other view. */ | 87 | in TextViewMode after switch from other view. */ | ||
86 | bool queryChangedInPreviousView() const; | 88 | Kexi::ViewMode queryChangedInView() const; | ||
87 | 89 | | |||
88 | /*! Sets the queryChangedInPreviousView flag. | 90 | /*! Sets the queryChangedInView flag. If @a set is true, then the flag is changed | ||
89 | @see queryChangedInPreviousView() */ | 91 | to the current view mode. If @a set is false, the flag is changed to Kexi::NoViewMode. | ||
90 | void setQueryChangedInPreviousView(bool set); | 92 | @see queryChangedInView() */ | ||
93 | void setQueryChangedInView(bool set); | ||||
91 | 94 | | |||
92 | private: | 95 | private: | ||
93 | KexiDB::QuerySchema *m_query; | 96 | KexiDB::QuerySchema *m_query; | ||
94 | bool m_queryChangedInPreviousView; | 97 | Kexi::ViewMode m_queryChangedInView; | ||
95 | }; | 98 | }; | ||
96 | 99 | | |||
97 | virtual KLocalizedString i18nMessage(const QString& englishMessage, | 100 | virtual KLocalizedString i18nMessage(const QString& englishMessage, | ||
98 | KexiWindow* window) const; | 101 | KexiWindow* window) const; | ||
99 | 102 | | |||
100 | /*! Renames stored data pointed by \a item to \a newName. | 103 | /*! Renames stored data pointed by \a item to \a newName. | ||
101 | Reimplemented to mark the query obsolete by using KexiDB::Connection::setQuerySchemaObsolete(). */ | 104 | Reimplemented to mark the query obsolete by using KexiDB::Connection::setQuerySchemaObsolete(). */ | ||
102 | virtual tristate rename(KexiPart::Item & item, const QString& newName); | 105 | virtual tristate rename(KexiPart::Item & item, const QString& newName); | ||
Show All 17 Lines |