diff options
Diffstat (limited to 'dbaccess/source/ui/inc/QueryTextView.hxx')
-rw-r--r-- | dbaccess/source/ui/inc/QueryTextView.hxx | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx index c41a7cea7bc9..33f66342b25d 100644 --- a/dbaccess/source/ui/inc/QueryTextView.hxx +++ b/dbaccess/source/ui/inc/QueryTextView.hxx @@ -16,23 +16,39 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYTEXTVIEW_HXX -#define INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYTEXTVIEW_HXX +#pragma once +#include <vcl/InterimItemWindow.hxx> #include "querycontainerwindow.hxx" +#include "sqledit.hxx" namespace dbaui { - class OSqlEdit; - class OQueryTextView : public vcl::Window + class OQueryTextView final : public InterimItemWindow { friend class OQueryViewSwitch; - VclPtr<OSqlEdit> m_pEdit; + + OQueryController& m_rController; + std::unique_ptr<SQLEditView> m_xSQL; + std::unique_ptr<weld::CustomWeld> m_xSQLEd; + + Timer m_timerUndoActionCreation; + OUString m_strOrigText; // is restored on undo + Timer m_timerInvalidate; + bool m_bStopTimer; + + DECL_LINK(OnUndoActionTimer, Timer*, void); + DECL_LINK(OnInvalidateTimer, Timer*, void); + DECL_LINK(ModifyHdl, LinkParamNone*, void); + public: - OQueryTextView( OQueryContainerWindow* pParent ); + OQueryTextView(OQueryContainerWindow* pParent, OQueryController& rController); virtual ~OQueryTextView() override; virtual void dispose() override; + void SetSQLText(const OUString& rNewText); + OUString GetSQLText() const; + virtual void GetFocus() override; bool isCutAllowed() const; @@ -44,15 +60,10 @@ namespace dbaui // set the statement for representation void setStatement(const OUString& _rsStatement); OUString getStatement() const; - // allow access to our edit - OSqlEdit* getSqlEdit() const { return m_pEdit; } - OQueryContainerWindow* getContainerWindow() { return static_cast< OQueryContainerWindow* >( GetParent() ); } - protected: - virtual void Resize() override; + void stopTimer(); + void startTimer(); }; } -#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYTEXTVIEW_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |