LibreOffice Module svx (master)  1
ClassificationDialog.hxx
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  */
10 
11 #ifndef INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
12 #define INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
13 
14 #include <sal/config.h>
15 #include <vcl/weld.hxx>
16 #include <svx/svxdllapi.h>
19 
20 namespace svx
21 {
22 class ClassificationEditView;
23 }
24 namespace weld
25 {
26 class CustomWeld;
27 }
28 
29 namespace svx
30 {
32 {
33 private:
36 
37  const bool m_bPerParagraph;
38  const std::function<void()> m_aParagraphSignHandler;
39 
42 
43  std::vector<std::vector<ClassificationResult>> m_aRecentlyUsedValuesCollection;
44  std::vector<ClassificationResult> m_aInitialValues;
45 
46  std::unique_ptr<weld::Button> m_xOkButton;
47  std::unique_ptr<weld::Button> m_xSignButton;
48  std::unique_ptr<weld::ToggleButton> m_xToolBox;
49  std::unique_ptr<weld::ComboBox> m_xRecentlyUsedListBox;
50  std::unique_ptr<weld::ComboBox> m_xClassificationListBox;
51  std::unique_ptr<weld::ComboBox> m_xInternationalClassificationListBox;
52  std::unique_ptr<weld::Label> m_xMarkingLabel;
53  std::unique_ptr<weld::TreeView> m_xMarkingListBox;
54  std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartListBox;
55  std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartNumberListBox;
56  std::unique_ptr<weld::Button> m_xIntellectualPropertyPartAddButton;
57  std::unique_ptr<weld::Entry> m_xIntellectualPropertyPartEdit;
58  std::unique_ptr<weld::Expander> m_xIntellectualPropertyExpander;
59  std::unique_ptr<ClassificationEditView> m_xEditWindow;
60  std::unique_ptr<weld::CustomWeld> m_xEditWindowWeld;
61 
62  DECL_LINK(ButtonClicked, weld::Button&, void);
63  DECL_LINK(OkHdl, weld::Button&, void);
64  DECL_LINK(SelectToolboxHdl, weld::Toggleable&, void);
65  DECL_LINK(SelectClassificationHdl, weld::ComboBox&, void);
66  DECL_LINK(SelectMarkingHdl, weld::TreeView&, bool);
67  DECL_LINK(SelectIPPartNumbersHdl, weld::TreeView&, bool);
68  DECL_LINK(SelectRecentlyUsedHdl, weld::ComboBox&, void);
69  DECL_LINK(SelectIPPartHdl, weld::TreeView&, bool);
70  DECL_LINK(EditWindowModifiedHdl, LinkParamNone*, void);
72  DECL_STATIC_LINK(ClassificationDialog, KeyInput, const KeyEvent&, bool);
73  DECL_LINK(OnAsyncExpandHdl, void*, void);
74 
75  void insertField(ClassificationType eType, OUString const& rString, OUString const& rFullString,
76  OUString const& rIdentifier = OUString());
77  void insertCategoryField(sal_Int32 nID);
78 
79  void readIn(std::vector<ClassificationResult> const& rInput);
80  void readRecentlyUsed();
81  void writeRecentlyUsed();
82  void toggleWidgetsDependingOnCategory();
83 
84 public:
85  ClassificationDialog(weld::Window* pParent, bool bPerParagraph,
86  const std::function<void()>& rParagraphSignHandler = []() {});
87  ~ClassificationDialog() override;
88 
89  std::vector<ClassificationResult> getResult();
90  void setupValues(std::vector<ClassificationResult> const& rInput);
91 };
92 
93 } // end svx namespace
94 
95 #endif // INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
96 
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::TreeView > m_xIntellectualPropertyPartNumberListBox
std::vector< std::vector< ClassificationResult > > m_aRecentlyUsedValuesCollection
SfxClassificationHelper maInternationalHelper
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
std::unique_ptr< weld::Button > m_xOkButton
SfxClassificationHelper maHelper
std::unique_ptr< weld::Expander > m_xIntellectualPropertyExpander
std::vector< ClassificationResult > m_aInitialValues
std::unique_ptr< weld::Entry > m_xIntellectualPropertyPartEdit
std::unique_ptr< ClassificationEditView > m_xEditWindow
DocumentType eType
std::unique_ptr< weld::CustomWeld > m_xEditWindowWeld
std::unique_ptr< weld::ComboBox > m_xInternationalClassificationListBox
const std::function< void()> m_aParagraphSignHandler
std::unique_ptr< weld::TreeView > m_xMarkingListBox
std::unique_ptr< weld::ComboBox > m_xRecentlyUsedListBox
std::unique_ptr< weld::ToggleButton > m_xToolBox
std::unique_ptr< weld::Button > m_xIntellectualPropertyPartAddButton
std::unique_ptr< weld::TreeView > m_xIntellectualPropertyPartListBox
std::unique_ptr< weld::ComboBox > m_xClassificationListBox
std::unique_ptr< weld::Button > m_xSignButton
std::unique_ptr< weld::Label > m_xMarkingLabel