LibreOffice Module dbaccess (master) 1
|
#include <tabletree.hxx>
Public Types | |
typedef std::pair< OUString, bool > | TTableViewName |
typedef std::vector< TTableViewName > | TNames |
Public Member Functions | |
OTableTreeListBox (std::unique_ptr< weld::TreeView > xTreeView, bool bShowToggles) | |
void | init () |
void | SuppressEmptyFolders () |
bool | isFolderEntry (const weld::TreeIter &rEntry) const |
determines whether the given entry denotes a tables folder More... | |
void | UpdateTableList (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection) |
fill the table list with the tables belonging to the connection described by the parameters More... | |
void | UpdateTableList (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Sequence< OUString > &_rTables, const css::uno::Sequence< OUString > &_rViews) |
fill the table list with the tables and views determined by the two given containers. More... | |
std::unique_ptr< weld::TreeIter > | addedTable (const OUString &_rName) |
to be used if a foreign instance added a table More... | |
void | removedTable (const OUString &_rName) |
to be used if a foreign instance removed a table More... | |
std::unique_ptr< weld::TreeIter > | getAllObjectsEntry () const |
void | checkWildcard (const weld::TreeIter &rEntry) |
does a wildcard check of the given entry More... | |
bool | isWildcardChecked (const weld::TreeIter &rEntry) |
determine if the given entry is 'wildcard checked' More... | |
void | CheckButtons () |
void | checkedButton_noBroadcast (const weld::TreeIter &rEntry) |
void | UpdateTableList (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const TNames &_rTables) |
fill the table list with the tables and views determined by the two given containers More... | |
css::sdb::application::NamedDatabaseObject | describeObject (const weld::TreeIter &rEntry) |
returns a NamedDatabaseObject record which describes the given entry More... | |
OUString | getQualifiedTableName (const weld::TreeIter &rEntry) const |
returns the fully qualified name of a table entry More... | |
std::unique_ptr< weld::TreeIter > | getEntryByQualifiedName (const OUString &rName) |
Public Member Functions inherited from dbaui::TreeListBox | |
TreeListBox (std::unique_ptr< weld::TreeView > xTreeView, bool bSQLType) | |
virtual | ~TreeListBox () |
std::unique_ptr< weld::TreeIter > | GetEntryPosByName (std::u16string_view rName, const weld::TreeIter *pStart=nullptr, const IEntryFilter *pFilter=nullptr) const |
std::unique_ptr< weld::TreeIter > | GetRootLevelParent (const weld::TreeIter *pEntry) const |
void | setControlActionListener (IControlActionListener *pListener) |
void | setContextMenuProvider (IContextMenuProvider *pContextMenuProvider) |
weld::TreeView & | GetWidget () |
const weld::TreeView & | GetWidget () const |
TransferDataContainer & | GetDataTransfer () |
sal_Int8 | AcceptDrop (const AcceptDropEvent &rEvt) |
sal_Int8 | ExecuteDrop (const ExecuteDropEvent &rEvt) |
void | SetSelChangeHdl (const Link< LinkParamNone *, void > &_rHdl) |
void | setCopyHandler (const Link< LinkParamNone *, void > &_rHdl) |
void | setPasteHandler (const Link< LinkParamNone *, void > &_rHdl) |
void | setDeleteHandler (const Link< LinkParamNone *, void > &_rHdl) |
Private Member Functions | |
TriState | implDetermineState (const weld::TreeIter &rEntry) |
void | implEmphasize (const weld::TreeIter &rEntry, bool _bChecked, bool _bUpdateDescendants=true, bool _bUpdateAncestors=true) |
std::unique_ptr< weld::TreeIter > | implAddEntry (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_rxMeta, const OUString &_rTableName, bool _bCheckName=true) |
adds the given entry to our list @precond our image provider must already have been reset to the connection to which the meta data belong. More... | |
void | implOnNewConnection (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection) |
bool | impl_getAndAssertMetaData (css::uno::Reference< css::sdbc::XDatabaseMetaData > &_out_rMetaData) const |
bool | haveVirtualRoot () const |
Private Attributes | |
css::uno::Reference< css::sdbc::XConnection > | m_xConnection |
std::unique_ptr< ImageProvider > | m_xImageProvider |
bool | m_bVirtualRoot |
bool | m_bNoEmptyFolders |
bool | m_bShowToggles |
Additional Inherited Members | |
Protected Member Functions inherited from dbaui::TreeListBox | |
DECL_LINK (KeyInputHdl, const KeyEvent &, bool) | |
DECL_LINK (SelectHdl, weld::TreeView &, void) | |
DECL_LINK (QueryTooltipHdl, const weld::TreeIter &, OUString) | |
DECL_LINK (CommandHdl, const CommandEvent &, bool) | |
DECL_LINK (DragBeginHdl, bool &, bool) | |
void | implStopSelectionTimer () |
void | implStartSelectionTimer () |
virtual bool | DoChildKeyInput (const KeyEvent &rKEvt) |
Protected Attributes inherited from dbaui::TreeListBox | |
std::unique_ptr< weld::TreeView > | m_xTreeView |
TreeListBoxDropTarget | m_aDropTargetHelper |
std::unique_ptr< weld::TreeIter > | m_xDragedEntry |
IControlActionListener * | m_pActionListener |
IContextMenuProvider * | m_pContextMenuProvider |
Definition at line 34 of file tabletree.hxx.
typedef std::vector< TTableViewName > dbaui::OTableTreeListBox::TNames |
Definition at line 50 of file tabletree.hxx.
typedef std::pair< OUString, bool > dbaui::OTableTreeListBox::TTableViewName |
Definition at line 49 of file tabletree.hxx.
dbaui::OTableTreeListBox::OTableTreeListBox | ( | std::unique_ptr< weld::TreeView > | xTreeView, |
bool | bShowToggles | ||
) |
Definition at line 55 of file tabletree.cxx.
References weld::Check, m_bShowToggles, and dbaui::TreeListBox::m_xTreeView.
std::unique_ptr< weld::TreeIter > dbaui::OTableTreeListBox::addedTable | ( | const OUString & | _rName | ) |
to be used if a foreign instance added a table
Definition at line 491 of file tabletree.cxx.
References DBG_UNHANDLED_EXCEPTION, and Exception.
void dbaui::OTableTreeListBox::CheckButtons | ( | ) |
Definition at line 613 of file tabletree.cxx.
void dbaui::OTableTreeListBox::checkedButton_noBroadcast | ( | const weld::TreeIter & | rEntry | ) |
Definition at line 295 of file tabletree.cxx.
References m_bShowToggles, dbaui::TreeListBox::m_xTreeView, and TRISTATE_INDET.
Referenced by checkWildcard().
void dbaui::OTableTreeListBox::checkWildcard | ( | const weld::TreeIter & | rEntry | ) |
does a wildcard check of the given entry
There are two different 'checked' states: If the user checks all children of an entry, this is different from checking the entry itself. The second is called 'wildcard' checking, 'cause in the resulting table filter it's represented by a wildcard.
Definition at line 277 of file tabletree.cxx.
References checkedButton_noBroadcast(), m_bShowToggles, dbaui::TreeListBox::m_xTreeView, and TRISTATE_TRUE.
NamedDatabaseObject dbaui::OTableTreeListBox::describeObject | ( | const weld::TreeIter & | rEntry | ) |
returns a NamedDatabaseObject record which describes the given entry
Definition at line 466 of file tabletree.cxx.
References dbaccess::TABLE.
Referenced by dbaui::OAppDetailPageHelper::describeCurrentSelectionForType().
std::unique_ptr< weld::TreeIter > dbaui::OTableTreeListBox::getAllObjectsEntry | ( | ) | const |
Definition at line 285 of file tabletree.cxx.
References haveVirtualRoot(), and dbaui::TreeListBox::m_xTreeView.
std::unique_ptr< weld::TreeIter > dbaui::OTableTreeListBox::getEntryByQualifiedName | ( | const OUString & | rName | ) |
Definition at line 561 of file tabletree.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, qualifiedNameComponents(), sCatalog, sName, and sSchema.
OUString dbaui::OTableTreeListBox::getQualifiedTableName | ( | const weld::TreeIter & | rEntry | ) | const |
returns the fully qualified name of a table entry
_pEntry | the entry whose name is to be obtained. Must not denote a folder entry. |
Definition at line 514 of file tabletree.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, sCatalog, and sSchema.
Referenced by dbaui::OAppDetailPageHelper::getQualifiedName().
|
inlineprivate |
Definition at line 126 of file tabletree.hxx.
References m_bVirtualRoot.
Referenced by getAllObjectsEntry().
|
private |
Definition at line 506 of file tabletree.cxx.
References m_xConnection.
|
private |
adds the given entry to our list @precond our image provider must already have been reset to the connection to which the meta data belong.
Definition at line 376 of file tabletree.cxx.
References qualifiedNameComponents(), sCatalog, sId, sName, sSchema, dbaccess::TABLE, and TRISTATE_FALSE.
|
private |
Definition at line 628 of file tabletree.cxx.
References TRISTATE_FALSE, TRISTATE_INDET, and TRISTATE_TRUE.
|
private |
Definition at line 343 of file tabletree.cxx.
|
private |
Definition at line 74 of file tabletree.cxx.
References m_xConnection, and m_xImageProvider.
|
inline |
Definition at line 47 of file tabletree.hxx.
References m_bVirtualRoot.
bool dbaui::OTableTreeListBox::isFolderEntry | ( | const weld::TreeIter & | rEntry | ) | const |
determines whether the given entry denotes a tables folder
Definition at line 66 of file tabletree.cxx.
References dbaui::TreeListBox::m_xTreeView.
bool dbaui::OTableTreeListBox::isWildcardChecked | ( | const weld::TreeIter & | rEntry | ) |
determine if the given entry is 'wildcard checked'
Definition at line 272 of file tabletree.cxx.
References dbaui::TreeListBox::m_xTreeView.
void dbaui::OTableTreeListBox::removedTable | ( | const OUString & | _rName | ) |
to be used if a foreign instance removed a table
Definition at line 599 of file tabletree.cxx.
References DBG_UNHANDLED_EXCEPTION, and Exception.
|
inline |
Definition at line 52 of file tabletree.hxx.
References m_bNoEmptyFolders.
void dbaui::OTableTreeListBox::UpdateTableList | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection | ) |
fill the table list with the tables belonging to the connection described by the parameters
_rxConnection | the connection, which must support the service com.sun.star.sdb.Connection |
<type | scope="css::sdbc">SQLException</type> if no connection could be created |
void dbaui::OTableTreeListBox::UpdateTableList | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection, |
const css::uno::Sequence< OUString > & | _rTables, | ||
const css::uno::Sequence< OUString > & | _rViews | ||
) |
fill the table list with the tables and views determined by the two given containers.
The views sequence is used to determine which table is of type view.
_rxConnection | the connection where you got the object names from. Must not be NULL. Used to split the full qualified names into its parts. |
_rTables | table/view sequence |
_rViews | view sequence |
void dbaui::OTableTreeListBox::UpdateTableList | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection, |
const TNames & | _rTables | ||
) |
fill the table list with the tables and views determined by the two given containers
_rxConnection | the connection where you got the object names from. Must not be NULL. Used to split the full qualified names into its parts. |
_rTables | table/view sequence, the second argument is <TRUE> if it is a table, otherwise it is a view. |
|
private |
Definition at line 41 of file tabletree.hxx.
Referenced by SuppressEmptyFolders().
|
private |
Definition at line 42 of file tabletree.hxx.
Referenced by checkedButton_noBroadcast(), checkWildcard(), and OTableTreeListBox().
|
private |
Definition at line 40 of file tabletree.hxx.
Referenced by haveVirtualRoot(), and init().
|
private |
Definition at line 37 of file tabletree.hxx.
Referenced by implOnNewConnection().
|
private |
Definition at line 39 of file tabletree.hxx.
Referenced by implOnNewConnection().