1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include <vcl/weld.hxx>
24 ListView(std::unique_ptr
<weld::TreeView
> xTreeView
);
27 void AppendItem(const OUString
& rId
, const OUString
& rTitle
, const OUString
& rSubtitle
,
28 const OUString
& rPath
, bool bDefault
);
30 void AppendRow(const OUString
& rImage
, const OUString
& rTitle
, const OUString
& rSubtitle
,
31 const OUString
& rApplication
, const OUString
& rModify
, const OUString
& rSize
,
34 void UpdateRow(int nIndex
, const OUString
& rImage
, const OUString
& rTitle
,
35 const OUString
& rSubtitle
, const OUString
& rApplication
, const OUString
& rModify
,
36 const OUString
& rSize
, const OUString
& rId
);
42 void sortColumn(const int col
);
48 void ShowListView() { mxTreeView
->show(); }
50 void HideListView() { mxTreeView
->hide(); }
52 void unselect_all() { mxTreeView
->unselect_all(); }
54 void grab_focus() { mxTreeView
->grab_focus(); }
56 void rename(const OUString
& rId
, const OUString
& rTitle
);
58 void refreshDefaultColumn();
61 sal_uInt16
get_nId(int pos
) const;
63 void select_id(const OUString
& sId
) { mxTreeView
->select_id(sId
); }
65 int get_selected_index() const { return mxTreeView
->get_selected_index(); }
67 std::vector
<int> get_selected_rows() const { return mxTreeView
->get_selected_rows(); }
69 bool IsListViewVisible() const { return mxTreeView
->is_visible(); }
71 OUString
get_id(int pos
) const { return mxTreeView
->get_id(pos
); }
73 void set_cursor(int pos
) { mxTreeView
->set_cursor(pos
); }
75 int get_cursor_index() const { return mxTreeView
->get_cursor_index(); }
77 sal_uInt16
get_cursor_nId() const { return get_nId(mxTreeView
->get_cursor_index()); }
79 void select(int pos
) { mxTreeView
->select(pos
); }
81 int get_index(sal_uInt16 nId
) const { return mxTreeView
->find_id(OUString::number(nId
)); }
83 DECL_LINK(ColumnClickedHdl
, const int, void);
85 DECL_LINK(QueryTooltipHdl
, const weld::TreeIter
&, OUString
);
88 std::unique_ptr
<weld::TreeView
> mxTreeView
;
89 std::vector
<std::unique_ptr
<ListViewItem
>> mListViewItems
;
99 OUString maApplication
;
103 /** Last modify time in seconds since 1/1/1970. */
105 /** Size in bytes of the file. */
108 OUString maDisplayModify
;
109 OUString maDisplaySize
;
110 OUString maDisplayPath
;
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */