LibreOffice Module dbaccess (master) 1
querycontainerwindow.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <vcl/window.hxx>
23#include <vcl/split.hxx>
24#include <dbaccess/dataview.hxx>
25#include <com/sun/star/frame/XFrame2.hpp>
26#include "QueryViewSwitch.hxx"
27#include <vcl/dockwin.hxx>
28
29namespace dbaui
30{
31
32 // OBeamer
33 // temporary class until the beamer is implemented
34 class OBeamer : public DockingWindow
35 {
36 public:
37 OBeamer(vcl::Window* _pParent) : DockingWindow(_pParent,0){}
38 };
39
40 // OQueryContainerWindow
42 {
46 css::uno::Reference< css::frame::XFrame2 > m_xBeamer;
47
48 DECL_LINK( SplitHdl, Splitter*, void );
49 public:
50 OQueryContainerWindow(vcl::Window* pParent, OQueryController& _rController,const css::uno::Reference< css::uno::XComponentContext >&);
51 virtual ~OQueryContainerWindow() override;
52 virtual void dispose() override;
53
54 virtual void Construct() override;
55
56 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
57
58 // show the beamer
59 void showPreview(const css::uno::Reference< css::frame::XFrame >& _xFrame);
60 // called when the beamer has been disposed
61 void disposingPreview();
62
63 const css::uno::Reference< css::frame::XFrame2 >&
64 getPreviewFrame() const { return m_xBeamer; }
65
67
68 bool isCutAllowed() const { return m_pViewSwitch->isCutAllowed(); }
69 bool isPasteAllowed() const { return m_pViewSwitch->isPasteAllowed(); }
70 bool isCopyAllowed() const { return m_pViewSwitch->isCopyAllowed(); }
71 void copy() { m_pViewSwitch->copy(); }
72 void cut() { m_pViewSwitch->cut(); }
73 void paste() { m_pViewSwitch->paste(); }
74
75 void clear() { m_pViewSwitch->clear(); }
76 bool isSlotEnabled( sal_Int32 _nSlotId ) { return m_pViewSwitch->isSlotEnabled( _nSlotId ); }
77 void setSlotEnabled( sal_Int32 _nSlotId, bool _bEnable ) { m_pViewSwitch->setSlotEnabled( _nSlotId, _bEnable ); }
78 void setNoneVisibleRow(sal_Int32 _nRows) { m_pViewSwitch->setNoneVisibleRow( _nRows); }
79
81 OUString getStatement() { return m_pViewSwitch->getStatement( ); }
82 void setStatement( const OUString& _rsStatement ) { m_pViewSwitch->setStatement( _rsStatement ); }
83
84 void initialize() override { m_pViewSwitch->initialize(); }
86 void reset() { m_pViewSwitch->reset(); }
87
88 bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
89 void forceInitialView();
90
91 virtual void GetFocus() override;
92
93 protected:
94 // re-arrange the controls belonging to the document itself
95 virtual void resizeAll( const tools::Rectangle& _rPlayground ) override;
96
97 // arrange derived classes controls in the rectangle given
98 virtual void resizeDocumentView(tools::Rectangle& _rPlayground) override;
99 };
100 // end of temp classes
101
102} // namespace dbaui
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OBeamer(vcl::Window *_pParent)
void setStatement(const OUString &_rsStatement)
void showPreview(const css::uno::Reference< css::frame::XFrame > &_xFrame)
void setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable)
virtual void dispose() override
virtual void Construct() override
late construction
virtual void resizeDocumentView(tools::Rectangle &_rPlayground) override
bool isSlotEnabled(sal_Int32 _nSlotId)
virtual ~OQueryContainerWindow() override
DECL_LINK(SplitHdl, Splitter *, void)
css::uno::Reference< css::frame::XFrame2 > m_xBeamer
virtual void GetFocus() override
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual void resizeAll(const tools::Rectangle &_rPlayground) override
re-arrange all controls, including the toolbox, it's separator, and the "real view"
OQueryContainerWindow(vcl::Window *pParent, OQueryController &_rController, const css::uno::Reference< css::uno::XComponentContext > &)
void setNoneVisibleRow(sal_Int32 _nRows)
const css::uno::Reference< css::frame::XFrame2 > & getPreviewFrame() const
bool switchView(::dbtools::SQLExceptionInfo *_pErrorInfo)
bool isSlotEnabled(sal_Int32 _nSlotId)
void setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable)
void setNoneVisibleRow(sal_Int32 _nRows)
void setStatement(const OUString &_rsStatement)
OQueryDesignView * getDesignView() const