// A helper class for the controls in the detail page. // Combines general functionality. class OAppDetailPageHelper final : public OChildWindow
{
std::unique_ptr<DBTreeViewBase> m_aLists[size_t(E_ELEMENT_TYPE_COUNT)];
OAppBorderWindow& m_rBorderWin;
std::unique_ptr<weld::Container> m_xBox;
std::unique_ptr<weld::Widget> m_xFL;
std::unique_ptr<weld::MenuButton> m_xMBPreview;
/// returns the index of the visible control int getVisibleControlIndex() const;
/** sorts the entries in the tree list box. @paramnPos Whichlistshouldbesorted. @parambAscending IfsortshouldbeAscendingofDescending
*/ void sort(int nPos, bool bAscending);
/** retrieves the resource ids of the images representing elements of the given type
*/ static OUString getElementIcons(ElementType _eType);
/** creates the page for the specific type. @param_eType Thetypewhichshouldbecreated.E_TABLEisn'tallowed. @param_xContainer Thecontaineroftheelementstobeinserted.
*/ void createPage(ElementType _eType,const css::uno::Reference< css::container::XNameAccess >& _xContainer);
/** returns the current visible tree list box
*/
DBTreeViewBase* getCurrentView() const
{
ElementType eType = getElementType(); return (eType != E_NONE ) ? m_aLists[static_cast<sal_Int32>(eType)].get() : nullptr;
}
/// select all entries in the visible control void selectAll();
/// returns <TRUE/> if it sorts ascending bool isSortUp() const;
/// sorts all entries ascending void sortDown();
/// sorts all entries descending void sortUp();
/** returns the element names which are selected @param_rNames Thelistwillbefilled.
*/ void getSelectionElementNames( std::vector< OUString>& _rNames ) const;
/** describes the current selection for the given control
*/ void describeCurrentSelectionForControl( const weld::TreeView& rControl,
css::uno::Sequence< css::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
);
/** describes the current selection for the given ElementType
*/ void describeCurrentSelectionForType( const ElementType _eType,
css::uno::Sequence< css::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
);
/** get the menu parent window for the given control
*/
vcl::Window* getMenuParent() const; void adjustMenuPosition(const weld::TreeView& rControl, ::Point& rPos) const;
/** select all names on the currently selected container. Non existence names where ignored. * *\param_aNamestheelementnames
*/ void selectElements(const css::uno::Sequence< OUString>& _aNames);
/// returns <TRUE/> when a detail page was filled bool isFilled() const;
/** adds a new object to the detail page. @param_eType Thetypewheretheentryshouldbeappended. @param_rName Thenameoftheobjecttobeinserted @param_rObject Theobjecttoadd. @param_rxConn Ifweinsertatable,theconnectionmustbeset.
*/
std::unique_ptr<weld::TreeIter> elementAdded(ElementType eType, const OUString& rName, const css::uno::Any& rObject);
/** replaces an objects name with a new one @param_eType Thetypewheretheentryshouldbeappended. @param_rOldName Theoldnameoftheobjecttobereplaced @param_rNewName Thenewnameoftheobjecttobereplaced @param_rxConn Ifweinsertatable,theconnectionmustbeset.
*/ void elementReplaced(ElementType eType
,const OUString& _rOldName
,const OUString& _rNewName );
/** removes an element from the detail page. @param_eType Thetypewheretheentryshouldbeappended. @param_rName Thenameoftheelementtoberemoved. @param_rxConn Ifweremoveatable,theconnectionmustbeset.
*/ void elementRemoved(ElementType _eType
,const OUString& _rName );
/// <TRUE/> if the preview is enabled bool isPreviewEnabled() const;
/** switches to the given preview mode @param_eMode themodetosetforthepreview @param_bForce Forcethepreviewtobereset
*/ void switchPreview(PreviewMode _eMode,bool _bForce = false);
/** shows the Preview of the content when it is enabled. @param_xContent Thecontentwhichmustsupportthe"preview"command.
*/ void showPreview(const css::uno::Reference< css::ucb::XContent >& _xContent);
/** shows the Preview of a table or query @param_sDataSourceName thenameofthedatasource @param_sName thenameoftableorquery @param_bTable <TRUE/>ifitisatable,otherwise<FALSE/> @returnvoid
*/ void showPreview( const OUString& _sDataSourceName, const OUString& _sName, bool _bTable);
};
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.