LibreOffice Module chart2 (master) 1
dlg_InsertAxis_Grid.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
21
22namespace chart
23{
24
26 : aPossibilityList{ true, true, true, true, true, true }
27 , aExistenceList{ false, false, false, false, false, false }
28{
29}
30
31// SchAxisDlg
32
34 const InsertAxisOrGridDialogData& rInput, bool bAxisDlg)
35 : GenericDialogController(pWindow,
36 bAxisDlg ?
37 OUString("modules/schart/ui/insertaxisdlg.ui") :
38 OUString("modules/schart/ui/insertgriddlg.ui"),
39 bAxisDlg ?
40 OUString("InsertAxisDialog") :
41 OUString("InsertGridDialog"))
42 , m_xCbPrimaryX(m_xBuilder->weld_check_button("primaryX"))
43 , m_xCbPrimaryY(m_xBuilder->weld_check_button("primaryY"))
44 , m_xCbPrimaryZ(m_xBuilder->weld_check_button("primaryZ"))
45 , m_xCbSecondaryX(m_xBuilder->weld_check_button("secondaryX"))
46 , m_xCbSecondaryY(m_xBuilder->weld_check_button("secondaryY"))
47 , m_xCbSecondaryZ(m_xBuilder->weld_check_button("secondaryZ"))
48{
49 if (bAxisDlg)
50 {
51 //todo: remove if secondary z axis are possible somewhere
52 m_xCbSecondaryZ->hide();
53 }
54
55 m_xCbPrimaryX->set_active( rInput.aExistenceList[0] );
56 m_xCbPrimaryY->set_active( rInput.aExistenceList[1] );
57 m_xCbPrimaryZ->set_active( rInput.aExistenceList[2] );
58 m_xCbSecondaryX->set_active( rInput.aExistenceList[3] );
59 m_xCbSecondaryY->set_active( rInput.aExistenceList[4] );
60 m_xCbSecondaryZ->set_active( rInput.aExistenceList[5] );
61
62 m_xCbPrimaryX->set_sensitive( rInput.aPossibilityList[0] );
63 m_xCbPrimaryY->set_sensitive( rInput.aPossibilityList[1] );
64 m_xCbPrimaryZ->set_sensitive( rInput.aPossibilityList[2] );
65 m_xCbSecondaryX->set_sensitive( rInput.aPossibilityList[3] );
66 m_xCbSecondaryY->set_sensitive( rInput.aPossibilityList[4] );
67 m_xCbSecondaryZ->set_sensitive( rInput.aPossibilityList[5] );
68}
69
71{
72 sal_Bool* pExistenceList = rOutput.aExistenceList.getArray();
73 pExistenceList[0]=m_xCbPrimaryX->get_active();
74 pExistenceList[1]=m_xCbPrimaryY->get_active();
75 pExistenceList[2]=m_xCbPrimaryZ->get_active();
76 pExistenceList[3]=m_xCbSecondaryX->get_active();
77 pExistenceList[4]=m_xCbSecondaryY->get_active();
78 pExistenceList[5]=m_xCbSecondaryZ->get_active();
79}
80
82 : SchAxisDlg(pParent, rInput, false) //rInAttrs, b3D, bNet, bSecondaryX, bSecondaryY, false )
83{
84}
85
86} //namespace chart
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CheckButton > m_xCbSecondaryY
std::unique_ptr< weld::CheckButton > m_xCbPrimaryZ
void getResult(InsertAxisOrGridDialogData &rOutput)
SchAxisDlg(weld::Window *pParent, const InsertAxisOrGridDialogData &rInput, bool bAxisDlg=true)
std::unique_ptr< weld::CheckButton > m_xCbSecondaryX
std::unique_ptr< weld::CheckButton > m_xCbSecondaryZ
std::unique_ptr< weld::CheckButton > m_xCbPrimaryY
std::unique_ptr< weld::CheckButton > m_xCbPrimaryX
SchGridDlg(weld::Window *pParent, const InsertAxisOrGridDialogData &rInput)
css::uno::Sequence< sal_Bool > aExistenceList
css::uno::Sequence< sal_Bool > aPossibilityList
unsigned char sal_Bool