LibreOffice Module dbaccess (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbaui::OApplicationDetailView Class Referencefinal

#include <AppDetailView.hxx>

Inheritance diagram for dbaui::OApplicationDetailView:
[legend]
Collaboration diagram for dbaui::OApplicationDetailView:
[legend]

Public Member Functions

 OApplicationDetailView (weld::Container *pParent, OAppBorderWindow &rBorder, PreviewMode ePreviewMode)
 
 ~OApplicationDetailView ()
 
void createTablesPage (const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
 creates the tables page More...
 
void createPage (ElementType _eType, const css::uno::Reference< css::container::XNameAccess > &_xContainer)
 creates the page for the specific type. More...
 
void setTaskExternalMnemonics (MnemonicGenerator const &_rMnemonics)
 
OAppBorderWindowgetBorderWin () const
 
OTasksWindowgetTasksWindow () const
 
bool isCutAllowed () override
 
bool isCopyAllowed () override
 
bool isPasteAllowed () override
 
void copy () override
 
void cut () override
 
void paste () override
 
OUString getQualifiedName (const weld::TreeIter *_pEntry) const
 return the qualified name. More...
 
bool isALeafSelected () const
 returns if one of the selected entries is a leaf More...
 
void selectAll ()
 select all entries in the detail page More...
 
bool isSortUp () const
 returns <TRUE> if it sorts ascending More...
 
void sortDown ()
 sort the entries in the detail page down More...
 
void sortUp ()
 sort the entries in the detail page up More...
 
bool isFilled () const
 returns <TRUE> when a detail page was filled More...
 
ElementType getElementType () const
 return the element of currently select entry More...
 
void clearPages (bool _bTaskAlso=true)
 clears the detail pages. More...
 
sal_Int32 getElementCount () const
 returns the count of entries More...
 
sal_Int32 getSelectionCount ()
 returns the count of selected entries More...
 
void getSelectionElementNames (std::vector< OUString > &_rNames) const
 returns the element names which are selected More...
 
void describeCurrentSelectionForControl (const weld::TreeView &rControl, css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &_out_rSelectedObjects)
 describes the current selection for the given control More...
 
void describeCurrentSelectionForType (const ElementType _eType, css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &_out_rSelectedObjects)
 describes the current selection for the given ElementType More...
 
vcl::WindowgetMenuParent () const
 get the menu parent window for the given control More...
 
void adjustMenuPosition (const weld::TreeView &rControl, ::Point &rPos) const
 
void selectElements (const css::uno::Sequence< OUString > &_aNames)
 select all names on the currently selected container. More...
 
std::unique_ptr< weld::TreeIterelementAdded (ElementType eType, const OUString &rName, const css::uno::Any &rObject)
 adds a new object to the detail page. More...
 
void elementReplaced (ElementType eType, const OUString &_rOldName, const OUString &_rNewName)
 replaces an objects name with a new one More...
 
void elementRemoved (ElementType _eType, const OUString &_rName)
 removes an element from the detail page. More...
 
PreviewMode getPreviewMode () const
 returns the preview mode More...
 
bool isPreviewEnabled () const
 <TRUE> if the preview is enabled More...
 
void switchPreview (PreviewMode _eMode)
 switches to the given preview mode More...
 
void showPreview (const css::uno::Reference< css::ucb::XContent > &_xContent)
 shows the Preview of the content when it is enabled. More...
 
void showPreview (const OUString &_sDataSourceName, const OUString &_sName, bool _bTable)
 shows the Preview of a table or query More...
 
std::unique_ptr< weld::TreeItergetEntry (const Point &rPosPixel) const
 
TreeListBoxgetTreeWindow () const
 
bool HasChildPathFocus () const
 
virtual bool isCutAllowed ()=0
 
virtual bool isCopyAllowed ()=0
 
virtual bool isPasteAllowed ()=0
 
virtual void copy ()=0
 
virtual void cut ()=0
 
virtual void paste ()=0
 

Static Public Member Functions

static bool isLeaf (const weld::TreeView &rTreeView, const weld::TreeIter &rEntry)
 returns if an entry is a leaf More...
 

Private Member Functions

const OAppDetailPageHelperGetControlHelper () const
 
OAppDetailPageHelperGetControlHelper ()
 
void impl_createPage (ElementType _eType, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::container::XNameAccess > &_rxNonTableElements)
 
const TaskPaneDataimpl_getTaskPaneData (ElementType _eType)
 
void impl_fillTaskPaneData (ElementType _eType, TaskPaneData &_rData) const
 

Private Attributes

std::unique_ptr< weld::Builderm_xBuilder
 
std::unique_ptr< weld::Containerm_xContainer
 
std::unique_ptr< weld::Panedm_xHorzSplitter
 
std::unique_ptr< weld::Containerm_xTasksParent
 
std::unique_ptr< weld::Containerm_xContainerParent
 
std::unique_ptr< OTitleWindowm_xTasks
 
std::unique_ptr< OTitleWindowm_xTitleContainer
 
OAppBorderWindowm_rBorderWin
 
std::shared_ptr< OChildWindowm_xControlHelper
 
std::vector< TaskPaneDatam_aTaskPaneData
 
MnemonicGenerator m_aExternalMnemonics
 

Additional Inherited Members

- Protected Member Functions inherited from dbaui::IClipboardTest
 ~IClipboardTest ()
 

Detailed Description

Definition at line 95 of file AppDetailView.hxx.

Constructor & Destructor Documentation

◆ OApplicationDetailView()

OApplicationDetailView::OApplicationDetailView ( weld::Container pParent,
OAppBorderWindow rBorder,
PreviewMode  ePreviewMode 
)

◆ ~OApplicationDetailView()

OApplicationDetailView::~OApplicationDetailView ( )

Definition at line 222 of file AppDetailView.cxx.

Member Function Documentation

◆ adjustMenuPosition()

void OApplicationDetailView::adjustMenuPosition ( const weld::TreeView rControl,
::Point rPos 
) const

◆ clearPages()

void OApplicationDetailView::clearPages ( bool  _bTaskAlso = true)

clears the detail pages.

Parameters
_bTaskAlsoIf <TRUE> the task window will also be cleared.

Definition at line 366 of file AppDetailView.cxx.

References dbaui::OTasksWindow::Clear(), dbaui::OAppDetailPageHelper::clearPages(), GetControlHelper(), and getTasksWindow().

Referenced by dbaui::OApplicationController::askToReconnect(), dbaui::OApplicationView::clearPages(), and dbaui::OApplicationController::refreshTables().

◆ copy()

void OApplicationDetailView::copy ( )
overridevirtual

Implements dbaui::IClipboardTest.

Definition at line 430 of file AppDetailView.cxx.

◆ createPage()

void OApplicationDetailView::createPage ( ElementType  _eType,
const css::uno::Reference< css::container::XNameAccess > &  _xContainer 
)

creates the page for the specific type.

Parameters
_eTypeThe type which should be created. E_TABLE isn't allowed.
_xContainerThe container of the elements to be inserted.

Definition at line 236 of file AppDetailView.cxx.

References impl_createPage().

Referenced by dbaui::OApplicationController::onContainerSelect().

◆ createTablesPage()

void OApplicationDetailView::createTablesPage ( const css::uno::Reference< css::sdbc::XConnection > &  _xConnection)

creates the tables page

Parameters
_xConnectionThe connection to get the table names

Definition at line 231 of file AppDetailView.cxx.

References dbaui::E_TABLE, and impl_createPage().

Referenced by dbaui::OApplicationController::onContainerSelect(), and dbaui::OApplicationController::refreshTables().

◆ cut()

void OApplicationDetailView::cut ( )
overridevirtual

Implements dbaui::IClipboardTest.

Definition at line 432 of file AppDetailView.cxx.

◆ describeCurrentSelectionForControl()

void OApplicationDetailView::describeCurrentSelectionForControl ( const weld::TreeView rControl,
css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &  _out_rSelectedObjects 
)

describes the current selection for the given control

Definition at line 388 of file AppDetailView.cxx.

References dbaui::OAppDetailPageHelper::describeCurrentSelectionForControl(), and GetControlHelper().

Referenced by dbaui::OApplicationView::describeCurrentSelectionForControl().

◆ describeCurrentSelectionForType()

void OApplicationDetailView::describeCurrentSelectionForType ( const ElementType  _eType,
css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &  _out_rSelectedObjects 
)

describes the current selection for the given ElementType

Definition at line 393 of file AppDetailView.cxx.

References dbaui::OAppDetailPageHelper::describeCurrentSelectionForType(), and GetControlHelper().

Referenced by dbaui::OApplicationView::describeCurrentSelectionForType().

◆ elementAdded()

std::unique_ptr< weld::TreeIter > OApplicationDetailView::elementAdded ( ElementType  eType,
const OUString &  rName,
const css::uno::Any &  rObject 
)

adds a new object to the detail page.

Parameters
_eTypeThe type where the entry should be appended.
_rNameThe name of the object to be inserted
_rObjectThe object to add.
_rxConnIf we insert a table, the connection must be set.

Definition at line 436 of file AppDetailView.cxx.

References dbaui::OAppDetailPageHelper::elementAdded(), and GetControlHelper().

Referenced by dbaui::OApplicationView::elementAdded().

◆ elementRemoved()

void OApplicationDetailView::elementRemoved ( ElementType  _eType,
const OUString &  _rName 
)

removes an element from the detail page.

Parameters
_eTypeThe type where the entry should be appended.
_rNameThe name of the element to be removed.
_rxConnIf we remove a table, the connection must be set.

Definition at line 441 of file AppDetailView.cxx.

References dbaui::OAppDetailPageHelper::elementRemoved(), and GetControlHelper().

Referenced by dbaui::OApplicationView::elementRemoved().

◆ elementReplaced()

void OApplicationDetailView::elementReplaced ( ElementType  eType,
const OUString &  _rOldName,
const OUString &  _rNewName 
)

replaces an objects name with a new one

Parameters
_eTypeThe type where the entry should be appended.
_rOldNameThe old name of the object to be replaced
_rNewNameThe new name of the object to be replaced
_rxConnIf we insert a table, the connection must be set.
_xObjectThe object which was replaced

Definition at line 446 of file AppDetailView.cxx.

References dbaui::OAppDetailPageHelper::elementReplaced(), and GetControlHelper().

Referenced by dbaui::OApplicationView::elementReplaced().

◆ getBorderWin()

OAppBorderWindow & dbaui::OApplicationDetailView::getBorderWin ( ) const
inline

Definition at line 132 of file AppDetailView.hxx.

References m_rBorderWin.

Referenced by impl_createPage(), and impl_fillTaskPaneData().

◆ GetControlHelper() [1/2]

OAppDetailPageHelper * OApplicationDetailView::GetControlHelper ( )
private

Definition at line 493 of file AppDetailView.cxx.

References m_xControlHelper.

◆ GetControlHelper() [2/2]

const OAppDetailPageHelper * OApplicationDetailView::GetControlHelper ( ) const
private

◆ getElementCount()

sal_Int32 OApplicationDetailView::getElementCount ( ) const

returns the count of entries

Definition at line 378 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getElementCount().

Referenced by dbaui::OApplicationView::getElementCount().

◆ getElementType()

ElementType OApplicationDetailView::getElementType ( ) const

return the element of currently select entry

Definition at line 361 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getElementType().

Referenced by dbaui::OApplicationView::getElementType().

◆ getEntry()

std::unique_ptr< weld::TreeIter > OApplicationDetailView::getEntry ( const Point rPosPixel) const

◆ getMenuParent()

vcl::Window * OApplicationDetailView::getMenuParent ( ) const

get the menu parent window for the given control

Definition at line 398 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getMenuParent().

Referenced by dbaui::OApplicationView::getMenuParent().

◆ getPreviewMode()

PreviewMode OApplicationDetailView::getPreviewMode ( ) const

returns the preview mode

Definition at line 453 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getPreviewMode().

Referenced by dbaui::OApplicationView::getPreviewMode().

◆ getQualifiedName()

OUString OApplicationDetailView::getQualifiedName ( const weld::TreeIter _pEntry) const

return the qualified name.

Parameters
_pEntryThe entry of a table, or query, form, report to get the qualified name. If the entry is <NULL>, the first selected is chosen.
Returns
the qualified name

Definition at line 326 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getQualifiedName().

Referenced by dbaui::OApplicationView::getQualifiedName().

◆ getSelectionCount()

sal_Int32 OApplicationDetailView::getSelectionCount ( )

returns the count of selected entries

Definition at line 373 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getSelectionCount().

Referenced by dbaui::OApplicationView::getSelectionCount().

◆ getSelectionElementNames()

void OApplicationDetailView::getSelectionElementNames ( std::vector< OUString > &  _rNames) const

returns the element names which are selected

Parameters
_rNamesThe list will be filled.

Definition at line 383 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::getSelectionElementNames().

Referenced by dbaui::OApplicationView::getSelectionElementNames().

◆ getTasksWindow()

OTasksWindow & dbaui::OApplicationDetailView::getTasksWindow ( ) const
inline

Definition at line 133 of file AppDetailView.hxx.

References m_xTasks.

Referenced by clearPages(), and impl_createPage().

◆ getTreeWindow()

TreeListBox * OApplicationDetailView::getTreeWindow ( ) const

◆ HasChildPathFocus()

bool OApplicationDetailView::HasChildPathFocus ( ) const

Definition at line 503 of file AppDetailView.cxx.

References m_xHorzSplitter, m_xTasks, and m_xTitleContainer.

Referenced by dbaui::OApplicationView::getElementType().

◆ impl_createPage()

void OApplicationDetailView::impl_createPage ( ElementType  _eType,
const css::uno::Reference< css::sdbc::XConnection > &  _rxConnection,
const css::uno::Reference< css::container::XNameAccess > &  _rxNonTableElements 
)
private

◆ impl_fillTaskPaneData()

void OApplicationDetailView::impl_fillTaskPaneData ( ElementType  _eType,
TaskPaneData _rData 
) const
private

◆ impl_getTaskPaneData()

const TaskPaneData & OApplicationDetailView::impl_getTaskPaneData ( ElementType  _eType)
private

Definition at line 313 of file AppDetailView.cxx.

References dbaui::E_ELEMENT_TYPE_COUNT, impl_fillTaskPaneData(), and m_aTaskPaneData.

Referenced by impl_createPage().

◆ isALeafSelected()

bool OApplicationDetailView::isALeafSelected ( ) const

returns if one of the selected entries is a leaf

Returns
<TRUE> if the entry is a leaf, otherwise <FALSE>

Definition at line 336 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::isALeafSelected().

Referenced by dbaui::OApplicationView::isALeafSelected().

◆ isCopyAllowed()

bool OApplicationDetailView::isCopyAllowed ( )
overridevirtual

Implements dbaui::IClipboardTest.

Definition at line 423 of file AppDetailView.cxx.

◆ isCutAllowed()

bool OApplicationDetailView::isCutAllowed ( )
overridevirtual

Implements dbaui::IClipboardTest.

Definition at line 418 of file AppDetailView.cxx.

◆ isFilled()

bool OApplicationDetailView::isFilled ( ) const

returns <TRUE> when a detail page was filled

Definition at line 356 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::isFilled().

Referenced by dbaui::OApplicationView::isFilled().

◆ isLeaf()

bool OApplicationDetailView::isLeaf ( const weld::TreeView rTreeView,
const weld::TreeIter rEntry 
)
static

returns if an entry is a leaf

Parameters
rTreeViewThe TreeView pEntry belongs to
rEntryThe entry to check
Returns
<TRUE> if the entry is a leaf, otherwise <FALSE>

Definition at line 331 of file AppDetailView.cxx.

References dbaui::OAppDetailPageHelper::isLeaf().

Referenced by dbaui::OApplicationView::isLeaf().

◆ isPasteAllowed()

bool OApplicationDetailView::isPasteAllowed ( )
overridevirtual

Implements dbaui::IClipboardTest.

Definition at line 428 of file AppDetailView.cxx.

◆ isPreviewEnabled()

bool OApplicationDetailView::isPreviewEnabled ( ) const

<TRUE> if the preview is enabled

Definition at line 458 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::isPreviewEnabled().

Referenced by dbaui::OApplicationView::isPreviewEnabled().

◆ isSortUp()

bool OApplicationDetailView::isSortUp ( ) const

returns <TRUE> if it sorts ascending

Definition at line 480 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::isSortUp().

Referenced by dbaui::OApplicationView::isSortUp().

◆ paste()

void OApplicationDetailView::paste ( )
overridevirtual

Implements dbaui::IClipboardTest.

Definition at line 434 of file AppDetailView.cxx.

◆ selectAll()

void OApplicationDetailView::selectAll ( )

select all entries in the detail page

Definition at line 341 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::selectAll().

Referenced by dbaui::OApplicationView::selectAll().

◆ selectElements()

void OApplicationDetailView::selectElements ( const css::uno::Sequence< OUString > &  _aNames)

select all names on the currently selected container.

Non existence names where ignored.

Parameters
_aNamesthe element names

Definition at line 408 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::selectElements().

Referenced by dbaui::OApplicationView::selectElements().

◆ setTaskExternalMnemonics()

void OApplicationDetailView::setTaskExternalMnemonics ( MnemonicGenerator const &  _rMnemonics)

Definition at line 226 of file AppDetailView.cxx.

References m_aExternalMnemonics.

◆ showPreview() [1/2]

void dbaui::OApplicationDetailView::showPreview ( const css::uno::Reference< css::ucb::XContent > &  _xContent)

shows the Preview of the content when it is enabled.

Parameters
_xContentThe content which must support the "preview" command.

Referenced by dbaui::OApplicationView::showPreview().

◆ showPreview() [2/2]

void OApplicationDetailView::showPreview ( const OUString &  _sDataSourceName,
const OUString &  _sName,
bool  _bTable 
)

shows the Preview of a table or query

Parameters
_sDataSourceNamethe name of the data source
_sNamethe name of table or query
_bTable<TRUE> if it is a table, otherwise <FALSE>
Returns
void

Definition at line 473 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::showPreview().

◆ sortDown()

void OApplicationDetailView::sortDown ( )

sort the entries in the detail page down

Definition at line 346 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::sortDown().

Referenced by dbaui::OApplicationView::sortDown().

◆ sortUp()

void OApplicationDetailView::sortUp ( )

sort the entries in the detail page up

Definition at line 351 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::sortUp().

Referenced by dbaui::OApplicationView::sortUp().

◆ switchPreview()

void OApplicationDetailView::switchPreview ( PreviewMode  _eMode)

switches to the given preview mode

Parameters
_eModethe mode to set for the preview

Definition at line 463 of file AppDetailView.cxx.

References GetControlHelper(), and dbaui::OAppDetailPageHelper::switchPreview().

Referenced by dbaui::OApplicationView::switchPreview().

Member Data Documentation

◆ m_aExternalMnemonics

MnemonicGenerator dbaui::OApplicationDetailView::m_aExternalMnemonics
private

Definition at line 107 of file AppDetailView.hxx.

Referenced by setTaskExternalMnemonics().

◆ m_aTaskPaneData

std::vector< TaskPaneData > dbaui::OApplicationDetailView::m_aTaskPaneData
private

Definition at line 106 of file AppDetailView.hxx.

Referenced by impl_getTaskPaneData().

◆ m_rBorderWin

OAppBorderWindow& dbaui::OApplicationDetailView::m_rBorderWin
private

Definition at line 104 of file AppDetailView.hxx.

Referenced by getBorderWin(), and OApplicationDetailView().

◆ m_xBuilder

std::unique_ptr<weld::Builder> dbaui::OApplicationDetailView::m_xBuilder
private

Definition at line 97 of file AppDetailView.hxx.

◆ m_xContainer

std::unique_ptr<weld::Container> dbaui::OApplicationDetailView::m_xContainer
private

Definition at line 98 of file AppDetailView.hxx.

◆ m_xContainerParent

std::unique_ptr<weld::Container> dbaui::OApplicationDetailView::m_xContainerParent
private

Definition at line 101 of file AppDetailView.hxx.

◆ m_xControlHelper

std::shared_ptr<OChildWindow> dbaui::OApplicationDetailView::m_xControlHelper
private

Definition at line 105 of file AppDetailView.hxx.

Referenced by GetControlHelper(), and OApplicationDetailView().

◆ m_xHorzSplitter

std::unique_ptr<weld::Paned> dbaui::OApplicationDetailView::m_xHorzSplitter
private

Definition at line 99 of file AppDetailView.hxx.

Referenced by HasChildPathFocus().

◆ m_xTasks

std::unique_ptr<OTitleWindow> dbaui::OApplicationDetailView::m_xTasks
private

Definition at line 102 of file AppDetailView.hxx.

Referenced by getTasksWindow(), HasChildPathFocus(), and OApplicationDetailView().

◆ m_xTasksParent

std::unique_ptr<weld::Container> dbaui::OApplicationDetailView::m_xTasksParent
private

Definition at line 100 of file AppDetailView.hxx.

◆ m_xTitleContainer

std::unique_ptr<OTitleWindow> dbaui::OApplicationDetailView::m_xTitleContainer
private

Definition at line 103 of file AppDetailView.hxx.

Referenced by HasChildPathFocus(), impl_createPage(), and OApplicationDetailView().


The documentation for this class was generated from the following files: