LibreOffice Module chart2 (master) 1
res_BarGeometry.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <res_BarGeometry.hxx>
21#include <ResId.hxx>
22#include <chart.hrc>
23
24namespace chart
25{
27 : m_xFT_Geometry(pBuilder->weld_label("shapeft"))
28 , m_xLB_Geometry(pBuilder->weld_tree_view("shape"))
29{
30 for (size_t i = 0; i < std::size(CHART_TYPE); ++i)
31 m_xLB_Geometry->append_text(SchResId(CHART_TYPE[i]));
32 m_xLB_Geometry->set_size_request(-1, m_xLB_Geometry->get_height_rows(std::size(CHART_TYPE)));
33}
34
36{
37 m_xLB_Geometry->connect_changed(rLink);
38}
39
41{
42 m_xFT_Geometry->set_visible(bShow);
43 m_xLB_Geometry->set_visible(bShow);
44}
45
47{
48 m_xFT_Geometry->set_sensitive(bEnable);
49 m_xLB_Geometry->set_sensitive(bEnable);
50}
51
53{
54 return m_xLB_Geometry->get_selected_index();
55}
56
58{
59 if (nPos < m_xLB_Geometry->n_children())
60 m_xLB_Geometry->select(nPos);
61}
62
63} //namespace chart
64
65/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 nPos
void connect_changed(const Link< weld::TreeView &, void > &rLink)
std::unique_ptr< weld::Label > m_xFT_Geometry
void set_sensitive(bool bEnable)
BarGeometryResources(weld::Builder *pParent)
void select(sal_Int32 nPos)
sal_Int32 get_selected_index() const
std::unique_ptr< weld::TreeView > m_xLB_Geometry
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId)
Definition: ResId.cxx:24
int i