Changeset View
Changeset View
Standalone View
Standalone View
src/core/KexiView.h
1 | /* This file is part of the KDE project | 1 | /* This file is part of the KDE project | ||
---|---|---|---|---|---|
2 | Copyright (C) 2004-2012 Jarosław Staniek <staniek@kde.org> | 2 | Copyright (C) 2004-2016 Jarosław Staniek <staniek@kde.org> | ||
3 | 3 | | |||
4 | This library is free software; you can redistribute it and/or | 4 | This library is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU Library General Public | 5 | modify it under the terms of the GNU Library General Public | ||
6 | License as published by the Free Software Foundation; either | 6 | License as published by the Free Software Foundation; either | ||
7 | version 2 of the License, or (at your option) any later version. | 7 | version 2 of the License, or (at your option) any later version. | ||
8 | 8 | | |||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 53 | public: | |||
133 | 133 | | |||
134 | QString defaultIconName() const; | 134 | QString defaultIconName() const; | ||
135 | 135 | | |||
136 | void setDefaultIconName(const QString& iconName); | 136 | void setDefaultIconName(const QString& iconName); | ||
137 | 137 | | |||
138 | /*! For KexiQueryView */ | 138 | /*! For KexiQueryView */ | ||
139 | virtual QList<QVariant> currentParameters() const; | 139 | virtual QList<QVariant> currentParameters() const; | ||
140 | 140 | | |||
141 | //! @return i18n'd message text to be displayed in the property pane if the current | ||||
142 | //! property set is @c nullptr. | ||||
143 | QString textToDisplayForNullSet() const; | ||||
144 | | ||||
141 | public Q_SLOTS: | 145 | public Q_SLOTS: | ||
142 | virtual void setFocus(); | 146 | virtual void setFocus(); | ||
143 | 147 | | |||
144 | /*! Call this in your view's implementation whenever current property set | 148 | /*! Call this in your view's implementation whenever current property set | ||
145 | (returned by propertySet()) is switched to other, | 149 | (returned by propertySet()) is switched to other, | ||
146 | so property editor contents need to be completely replaced. */ | 150 | so property editor contents need to be completely replaced. */ | ||
147 | virtual void propertySetSwitched(); | 151 | virtual void propertySetSwitched(); | ||
148 | 152 | | |||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Line(s) | 173 | protected: | |||
333 | void initViewActions(); | 337 | void initViewActions(); | ||
334 | void initMainMenuActions(); | 338 | void initMainMenuActions(); | ||
335 | 339 | | |||
336 | void toggleViewModeButtonBack(); | 340 | void toggleViewModeButtonBack(); | ||
337 | 341 | | |||
338 | //! Sets properties in the Property Editor to be sorted if @a set is true. | 342 | //! Sets properties in the Property Editor to be sorted if @a set is true. | ||
339 | void setSortedProperties(bool set); | 343 | void setSortedProperties(bool set); | ||
340 | 344 | | |||
345 | /*! Sets i18n'd message text to be displayed in the property pane if the current property set | ||||
346 | is @c nullptr. By default it is empty, what means "No object selected" is displayed. */ | ||||
347 | void setTextToDisplayForNullSet(const QString& text); | ||||
348 | | ||||
341 | private Q_SLOTS: | 349 | private Q_SLOTS: | ||
342 | void slotSwitchToViewModeInternal(Kexi::ViewMode mode); | 350 | void slotSwitchToViewModeInternal(Kexi::ViewMode mode); | ||
343 | void slotSwitchToDataViewModeInternal(bool); | | |||
344 | void slotSwitchToDesignViewModeInternal(bool); | 351 | void slotSwitchToDesignViewModeInternal(bool); | ||
345 | void slotSwitchToTextViewModeInternal(bool); | 352 | void slotSwitchToTextViewModeInternal(bool); | ||
346 | 353 | | |||
347 | private: | 354 | private: | ||
355 | void createTopBar(); | ||||
348 | void createViewModeToggleButtons(); | 356 | void createViewModeToggleButtons(); | ||
349 | 357 | | |||
350 | class Private; | 358 | class Private; | ||
351 | Private * const d; | 359 | Private * const d; | ||
352 | friend class KexiWindow; | 360 | friend class KexiWindow; | ||
353 | }; | 361 | }; | ||
354 | 362 | | |||
355 | Q_DECLARE_OPERATORS_FOR_FLAGS(KexiView::StoreNewDataOptions) | 363 | Q_DECLARE_OPERATORS_FOR_FLAGS(KexiView::StoreNewDataOptions) | ||
356 | 364 | | |||
357 | #endif | 365 | #endif |