LibreOffice Module sfx2 (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ListView Class Reference

#include <listview.hxx>

Inheritance diagram for ListView:
[legend]

Public Member Functions

 ListView (std::unique_ptr< weld::TreeView > xTreeView)
 
 ~ListView ()
 
void AppendItem (const OUString &rId, const OUString &rTitle, const OUString &rSubtitle, const OUString &rPath, bool bDefault)
 
void AppendRow (const OUString &rImage, const OUString &rTitle, const OUString &rSubtitle, const OUString &rApplication, const OUString &rModify, const OUString &rSize, const OUString &rId)
 
void UpdateRow (int nIndex, const OUString &rImage, const OUString &rTitle, const OUString &rSubtitle, const OUString &rApplication, const OUString &rModify, const OUString &rSize, const OUString &rId)
 
void ReloadRows ()
 
bool UpdateRows ()
 
void sortColumn (const int col)
 
void sort ()
 
void clearListView ()
 
void ShowListView ()
 
void HideListView ()
 
void unselect_all ()
 
void grab_focus ()
 
void rename (const OUString &rId, const OUString &rTitle)
 
void refreshDefaultColumn ()
 

Protected Member Functions

sal_uInt16 get_nId (int pos) const
 
void select_id (const OUString &sId)
 
int get_selected_index () const
 
std::vector< intget_selected_rows () const
 
bool IsListViewVisible () const
 
OUString get_id (int pos) const
 
void set_cursor (int pos)
 
int get_cursor_index () const
 
sal_uInt16 get_cursor_nId () const
 
void select (int pos)
 
int get_index (sal_uInt16 nId) const
 
 DECL_LINK (ColumnClickedHdl, const int, void)
 
 DECL_LINK (QueryTooltipHdl, const weld::TreeIter &, OUString)
 

Protected Attributes

std::unique_ptr< weld::TreeViewmxTreeView
 
std::vector< std::unique_ptr< ListViewItem > > mListViewItems
 
int mnSortColumn
 

Detailed Description

Definition at line 23 of file listview.hxx.

Constructor & Destructor Documentation

◆ ListView()

ListView::ListView ( std::unique_ptr< weld::TreeView xTreeView)

Definition at line 47 of file listview.cxx.

References LINK, mxTreeView, TEMPLATE_ITEM_MAX_HEIGHT_SUB, and TEMPLATE_ITEM_MAX_WIDTH.

◆ ~ListView()

ListView::~ListView ( )

Definition at line 67 of file listview.cxx.

Member Function Documentation

◆ AppendItem()

void ListView::AppendItem ( const OUString &  rId,
const OUString &  rTitle,
const OUString &  rSubtitle,
const OUString &  rPath,
bool  bDefault 
)

◆ AppendRow()

void ListView::AppendRow ( const OUString &  rImage,
const OUString &  rTitle,
const OUString &  rSubtitle,
const OUString &  rApplication,
const OUString &  rModify,
const OUString &  rSize,
const OUString &  rId 
)

◆ clearListView()

void ListView::clearListView ( )

Definition at line 283 of file listview.cxx.

References mListViewItems, and mxTreeView.

Referenced by TemplateDlgLocalView::insertFilteredItems().

◆ DECL_LINK() [1/2]

ListView::DECL_LINK ( ColumnClickedHdl  ,
const int  ,
void   
)
protected

◆ DECL_LINK() [2/2]

ListView::DECL_LINK ( QueryTooltipHdl  ,
const weld::TreeIter ,
OUString   
)
protected

◆ get_cursor_index()

int ListView::get_cursor_index ( ) const
inlineprotected

Definition at line 77 of file listview.hxx.

References mxTreeView.

Referenced by ReloadRows(), and UpdateRows().

◆ get_cursor_nId()

sal_uInt16 ListView::get_cursor_nId ( ) const
inlineprotected

Definition at line 79 of file listview.hxx.

References get_nId(), and mxTreeView.

Referenced by TemplateDlgLocalView::syncCursor(), and TemplateDlgLocalView::updateSelection().

◆ get_id()

OUString ListView::get_id ( int  pos) const
inlineprotected

Definition at line 73 of file listview.hxx.

References mxTreeView, and pos.

Referenced by ReloadRows(), and UpdateRows().

◆ get_index()

int ListView::get_index ( sal_uInt16  nId) const
inlineprotected

Definition at line 83 of file listview.hxx.

References mxTreeView, and nId.

Referenced by TemplateDlgLocalView::syncCursor().

◆ get_nId()

sal_uInt16 ListView::get_nId ( int  pos) const
protected

Definition at line 300 of file listview.cxx.

References mxTreeView, and pos.

Referenced by get_cursor_nId(), and TemplateDlgLocalView::updateSelection().

◆ get_selected_index()

int ListView::get_selected_index ( ) const
inlineprotected

Definition at line 67 of file listview.hxx.

References mxTreeView.

Referenced by ReloadRows(), and UpdateRows().

◆ get_selected_rows()

std::vector< int > ListView::get_selected_rows ( ) const
inlineprotected

◆ grab_focus()

void ListView::grab_focus ( )
inline

Definition at line 56 of file listview.hxx.

References mxTreeView.

◆ HideListView()

void ListView::HideListView ( )
inline

Definition at line 52 of file listview.hxx.

References mxTreeView.

Referenced by TemplateDlgLocalView::Hide(), and TemplateDlgLocalView::Show().

◆ IsListViewVisible()

bool ListView::IsListViewVisible ( ) const
inlineprotected

Definition at line 71 of file listview.hxx.

References mxTreeView.

Referenced by TemplateDlgLocalView::IsVisible().

◆ refreshDefaultColumn()

void ListView::refreshDefaultColumn ( )

◆ ReloadRows()

void ListView::ReloadRows ( )

◆ rename()

void ListView::rename ( const OUString &  rId,
const OUString &  rTitle 
)

Definition at line 272 of file listview.cxx.

References COLUMN_NAME, mListViewItems, and mxTreeView.

Referenced by TemplateDlgLocalView::ContextMenuSelectHdl().

◆ select()

void ListView::select ( int  pos)
inlineprotected

Definition at line 81 of file listview.hxx.

References mxTreeView, and pos.

Referenced by TemplateDlgLocalView::syncCursor().

◆ select_id()

void ListView::select_id ( const OUString &  sId)
inlineprotected

Definition at line 65 of file listview.hxx.

References mxTreeView, and sId.

Referenced by ReloadRows(), and UpdateRows().

◆ set_cursor()

void ListView::set_cursor ( int  pos)
inlineprotected

Definition at line 75 of file listview.hxx.

References mxTreeView, and pos.

Referenced by ReloadRows(), TemplateDlgLocalView::syncCursor(), and UpdateRows().

◆ ShowListView()

void ListView::ShowListView ( )
inline

Definition at line 50 of file listview.hxx.

References mxTreeView.

Referenced by TemplateDlgLocalView::Show().

◆ sort()

void ListView::sort ( )

Definition at line 254 of file listview.cxx.

References mnSortColumn, and sortColumn().

Referenced by TemplateDlgLocalView::insertFilteredItems().

◆ sortColumn()

void ListView::sortColumn ( const int  col)

◆ unselect_all()

void ListView::unselect_all ( )
inline

◆ UpdateRow()

void ListView::UpdateRow ( int  nIndex,
const OUString &  rImage,
const OUString &  rTitle,
const OUString &  rSubtitle,
const OUString &  rApplication,
const OUString &  rModify,
const OUString &  rSize,
const OUString &  rId 
)

◆ UpdateRows()

bool ListView::UpdateRows ( )

Member Data Documentation

◆ mListViewItems

std::vector<std::unique_ptr<ListViewItem> > ListView::mListViewItems
protected

◆ mnSortColumn

int ListView::mnSortColumn
protected

Definition at line 92 of file listview.hxx.

Referenced by sort(), and sortColumn().

◆ mxTreeView

std::unique_ptr<weld::TreeView> ListView::mxTreeView
protected

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