LibreOffice Module dbaccess (master) 1
|
#include <AppDetailView.hxx>
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) |
OAppBorderWindow & | getBorderWin () const |
OTasksWindow & | getTasksWindow () 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::Window * | getMenuParent () 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::TreeIter > | elementAdded (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::TreeIter > | getEntry (const Point &rPosPixel) const |
TreeListBox * | getTreeWindow () 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 OAppDetailPageHelper * | GetControlHelper () const |
OAppDetailPageHelper * | GetControlHelper () |
void | impl_createPage (ElementType _eType, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::container::XNameAccess > &_rxNonTableElements) |
const TaskPaneData & | impl_getTaskPaneData (ElementType _eType) |
void | impl_fillTaskPaneData (ElementType _eType, TaskPaneData &_rData) const |
Private Attributes | |
std::unique_ptr< weld::Builder > | m_xBuilder |
std::unique_ptr< weld::Container > | m_xContainer |
std::unique_ptr< weld::Paned > | m_xHorzSplitter |
std::unique_ptr< weld::Container > | m_xTasksParent |
std::unique_ptr< weld::Container > | m_xContainerParent |
std::unique_ptr< OTitleWindow > | m_xTasks |
std::unique_ptr< OTitleWindow > | m_xTitleContainer |
OAppBorderWindow & | m_rBorderWin |
std::shared_ptr< OChildWindow > | m_xControlHelper |
std::vector< TaskPaneData > | m_aTaskPaneData |
MnemonicGenerator | m_aExternalMnemonics |
Additional Inherited Members | |
Protected Member Functions inherited from dbaui::IClipboardTest | |
~IClipboardTest () | |
Definition at line 95 of file AppDetailView.hxx.
OApplicationDetailView::OApplicationDetailView | ( | weld::Container * | pParent, |
OAppBorderWindow & | rBorder, | ||
PreviewMode | ePreviewMode | ||
) |
Definition at line 203 of file AppDetailView.cxx.
References get(), dbaui::ODataView::getCommandController(), dbaui::OAppBorderWindow::getView(), dbaui::IController::isDataSourceReadOnly(), m_rBorderWin, m_xControlHelper, m_xTasks, and m_xTitleContainer.
OApplicationDetailView::~OApplicationDetailView | ( | ) |
Definition at line 222 of file AppDetailView.cxx.
void OApplicationDetailView::adjustMenuPosition | ( | const weld::TreeView & | rControl, |
::Point & | rPos | ||
) | const |
Definition at line 403 of file AppDetailView.cxx.
References dbaui::OAppDetailPageHelper::adjustMenuPosition(), and GetControlHelper().
Referenced by dbaui::OApplicationView::adjustMenuPosition().
void OApplicationDetailView::clearPages | ( | bool | _bTaskAlso = true | ) |
clears the detail pages.
_bTaskAlso | If <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().
|
overridevirtual |
Implements dbaui::IClipboardTest.
Definition at line 430 of file AppDetailView.cxx.
void OApplicationDetailView::createPage | ( | ElementType | _eType, |
const css::uno::Reference< css::container::XNameAccess > & | _xContainer | ||
) |
creates the page for the specific type.
_eType | The type which should be created. E_TABLE isn't allowed. |
_xContainer | The container of the elements to be inserted. |
Definition at line 236 of file AppDetailView.cxx.
References impl_createPage().
Referenced by dbaui::OApplicationController::onContainerSelect().
void OApplicationDetailView::createTablesPage | ( | const css::uno::Reference< css::sdbc::XConnection > & | _xConnection | ) |
creates the tables page
_xConnection | The 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().
|
overridevirtual |
Implements dbaui::IClipboardTest.
Definition at line 432 of file AppDetailView.cxx.
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().
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().
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.
_eType | The type where the entry should be appended. |
_rName | The name of the object to be inserted |
_rObject | The object to add. |
_rxConn | If 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().
void OApplicationDetailView::elementRemoved | ( | ElementType | _eType, |
const OUString & | _rName | ||
) |
removes an element from the detail page.
_eType | The type where the entry should be appended. |
_rName | The name of the element to be removed. |
_rxConn | If 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().
void OApplicationDetailView::elementReplaced | ( | ElementType | eType, |
const OUString & | _rOldName, | ||
const OUString & | _rNewName | ||
) |
replaces an objects name with a new one
_eType | The type where the entry should be appended. |
_rOldName | The old name of the object to be replaced |
_rNewName | The new name of the object to be replaced |
_rxConn | If we insert a table, the connection must be set. |
_xObject | The object which was replaced |
Definition at line 446 of file AppDetailView.cxx.
References dbaui::OAppDetailPageHelper::elementReplaced(), and GetControlHelper().
Referenced by dbaui::OApplicationView::elementReplaced().
|
inline |
Definition at line 132 of file AppDetailView.hxx.
References m_rBorderWin.
Referenced by impl_createPage(), and impl_fillTaskPaneData().
|
private |
Definition at line 493 of file AppDetailView.cxx.
References m_xControlHelper.
|
private |
Definition at line 498 of file AppDetailView.cxx.
References m_xControlHelper.
Referenced by adjustMenuPosition(), clearPages(), describeCurrentSelectionForControl(), describeCurrentSelectionForType(), elementAdded(), elementRemoved(), elementReplaced(), getElementCount(), getElementType(), getEntry(), getMenuParent(), getPreviewMode(), getQualifiedName(), getSelectionCount(), getSelectionElementNames(), getTreeWindow(), impl_createPage(), isALeafSelected(), isFilled(), isPreviewEnabled(), isSortUp(), selectAll(), selectElements(), showPreview(), sortDown(), sortUp(), and switchPreview().
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().
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().
std::unique_ptr< weld::TreeIter > OApplicationDetailView::getEntry | ( | const Point & | rPosPixel | ) | const |
Definition at line 413 of file AppDetailView.cxx.
References GetControlHelper(), and dbaui::OAppDetailPageHelper::getEntry().
Referenced by dbaui::OApplicationView::getEntry().
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().
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().
OUString OApplicationDetailView::getQualifiedName | ( | const weld::TreeIter * | _pEntry | ) | const |
return the qualified name.
_pEntry | The entry of a table, or query, form, report to get the qualified name. If the entry is <NULL>, the first selected is chosen. |
Definition at line 326 of file AppDetailView.cxx.
References GetControlHelper(), and dbaui::OAppDetailPageHelper::getQualifiedName().
Referenced by dbaui::OApplicationView::getQualifiedName().
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().
void OApplicationDetailView::getSelectionElementNames | ( | std::vector< OUString > & | _rNames | ) | const |
returns the element names which are selected
_rNames | The list will be filled. |
Definition at line 383 of file AppDetailView.cxx.
References GetControlHelper(), and dbaui::OAppDetailPageHelper::getSelectionElementNames().
Referenced by dbaui::OApplicationView::getSelectionElementNames().
|
inline |
Definition at line 133 of file AppDetailView.hxx.
References m_xTasks.
Referenced by clearPages(), and impl_createPage().
TreeListBox * OApplicationDetailView::getTreeWindow | ( | ) | const |
Definition at line 485 of file AppDetailView.cxx.
References GetControlHelper(), dbaui::OAppDetailPageHelper::getCurrentView(), and dbaui::DBTreeViewBase::getListBox().
Referenced by dbaui::OApplicationController::requestDrag().
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().
|
private |
Definition at line 241 of file AppDetailView.cxx.
References dbaui::TaskPaneData::aTasks, dbaui::OAppDetailPageHelper::createPage(), dbaui::OAppDetailPageHelper::createTablesPage(), dbaui::E_TABLE, dbaui::OChildWindow::Enable(), dbaui::OTasksWindow::fillTaskEntryList(), getBorderWin(), dbaui::ODataView::getCommandController(), GetControlHelper(), getTasksWindow(), dbaui::OAppBorderWindow::getView(), impl_getTaskPaneData(), dbaui::IController::isCommandEnabled(), m_xTitleContainer, and dbaui::TaskPaneData::pTitleId.
Referenced by createPage(), and createTablesPage().
|
private |
Definition at line 262 of file AppDetailView.cxx.
References dbaui::TaskPaneData::aTasks, dbaui::E_FORM, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, getBorderWin(), getView(), and dbaui::TaskPaneData::pTitleId.
Referenced by impl_getTaskPaneData().
|
private |
Definition at line 313 of file AppDetailView.cxx.
References dbaui::E_ELEMENT_TYPE_COUNT, impl_fillTaskPaneData(), and m_aTaskPaneData.
Referenced by impl_createPage().
bool OApplicationDetailView::isALeafSelected | ( | ) | const |
returns if one of the selected entries is a leaf
Definition at line 336 of file AppDetailView.cxx.
References GetControlHelper(), and dbaui::OAppDetailPageHelper::isALeafSelected().
Referenced by dbaui::OApplicationView::isALeafSelected().
|
overridevirtual |
Implements dbaui::IClipboardTest.
Definition at line 423 of file AppDetailView.cxx.
|
overridevirtual |
Implements dbaui::IClipboardTest.
Definition at line 418 of file AppDetailView.cxx.
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().
|
static |
returns if an entry is a leaf
rTreeView | The TreeView pEntry belongs to |
rEntry | The entry to check |
Definition at line 331 of file AppDetailView.cxx.
References dbaui::OAppDetailPageHelper::isLeaf().
Referenced by dbaui::OApplicationView::isLeaf().
|
overridevirtual |
Implements dbaui::IClipboardTest.
Definition at line 428 of file AppDetailView.cxx.
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().
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().
|
overridevirtual |
Implements dbaui::IClipboardTest.
Definition at line 434 of file AppDetailView.cxx.
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().
void OApplicationDetailView::selectElements | ( | const css::uno::Sequence< OUString > & | _aNames | ) |
select all names on the currently selected container.
Non existence names where ignored.
_aNames | the element names |
Definition at line 408 of file AppDetailView.cxx.
References GetControlHelper(), and dbaui::OAppDetailPageHelper::selectElements().
Referenced by dbaui::OApplicationView::selectElements().
void OApplicationDetailView::setTaskExternalMnemonics | ( | MnemonicGenerator const & | _rMnemonics | ) |
Definition at line 226 of file AppDetailView.cxx.
References m_aExternalMnemonics.
void dbaui::OApplicationDetailView::showPreview | ( | const css::uno::Reference< css::ucb::XContent > & | _xContent | ) |
shows the Preview of the content when it is enabled.
_xContent | The content which must support the "preview" command. |
Referenced by dbaui::OApplicationView::showPreview().
void OApplicationDetailView::showPreview | ( | const OUString & | _sDataSourceName, |
const OUString & | _sName, | ||
bool | _bTable | ||
) |
shows the Preview of a table or query
_sDataSourceName | the name of the data source |
_sName | the name of table or query |
_bTable | <TRUE> if it is a table, otherwise <FALSE> |
Definition at line 473 of file AppDetailView.cxx.
References GetControlHelper(), and dbaui::OAppDetailPageHelper::showPreview().
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().
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().
void OApplicationDetailView::switchPreview | ( | PreviewMode | _eMode | ) |
switches to the given preview mode
_eMode | the 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().
|
private |
Definition at line 107 of file AppDetailView.hxx.
Referenced by setTaskExternalMnemonics().
|
private |
Definition at line 106 of file AppDetailView.hxx.
Referenced by impl_getTaskPaneData().
|
private |
Definition at line 104 of file AppDetailView.hxx.
Referenced by getBorderWin(), and OApplicationDetailView().
|
private |
Definition at line 97 of file AppDetailView.hxx.
|
private |
Definition at line 98 of file AppDetailView.hxx.
|
private |
Definition at line 101 of file AppDetailView.hxx.
|
private |
Definition at line 105 of file AppDetailView.hxx.
Referenced by GetControlHelper(), and OApplicationDetailView().
|
private |
Definition at line 99 of file AppDetailView.hxx.
Referenced by HasChildPathFocus().
|
private |
Definition at line 102 of file AppDetailView.hxx.
Referenced by getTasksWindow(), HasChildPathFocus(), and OApplicationDetailView().
|
private |
Definition at line 100 of file AppDetailView.hxx.
|
private |
Definition at line 103 of file AppDetailView.hxx.
Referenced by HasChildPathFocus(), impl_createPage(), and OApplicationDetailView().