Messagelib

aggregationeditor.h
1 /******************************************************************************
2  *
3  * SPDX-FileCopyrightText: 2008 Szymon Tomasz Stefanek <[email protected]>
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  *
7  *******************************************************************************/
8 
9 #ifndef MESSAGELIST_UTILS_AGGREGATIONEDITOR_H
10 #define MESSAGELIST_UTILS_AGGREGATIONEDITOR_H
11 
12 #include <utils/optionseteditor.h>
13 
14 class QComboBox;
15 
16 namespace MessageList {
17 namespace Core {
18 class Aggregation;
19 } // namespace Core
20 
21 namespace Utils {
28 {
29  Q_OBJECT
30 public:
31  explicit AggregationEditor(QWidget *parent);
32  ~AggregationEditor() override;
33 
34 private:
35  Core::Aggregation *mCurrentAggregation = nullptr; // shallow, may be null!
36 
37  // Grouping, Threading and Sorting tab
38  QComboBox *mGroupingCombo = nullptr;
39  QComboBox *mGroupExpandPolicyCombo = nullptr;
40  QComboBox *mThreadingCombo = nullptr;
41  QComboBox *mThreadLeaderCombo = nullptr;
42  QComboBox *mThreadExpandPolicyCombo = nullptr;
43  // Advanced tab
44  QComboBox *mFillViewStrategyCombo = nullptr;
45 
46 public:
52  void editAggregation(Core::Aggregation *set);
53 
59  {
60  return mCurrentAggregation;
61  }
62 
66  void commit();
67 
68 Q_SIGNALS:
74  void aggregationNameChanged();
75 
76 private:
77 
78  // Helpers for filling the various editing elements
79 
80  void fillGroupingCombo();
81  void fillGroupExpandPolicyCombo();
82  void fillThreadingCombo();
83  void fillThreadLeaderCombo();
84  void fillThreadExpandPolicyCombo();
85  void fillFillViewStrategyCombo();
86  void setReadOnly(bool readOnly);
87 
88 private Q_SLOTS:
89 
90  // Internal handlers for editing element interaction
91 
92  void groupingComboActivated(int idx);
93  void threadingComboActivated(int idx);
94  void slotNameEditTextEdited(const QString &newName) override;
95 };
96 } // namespace Utils
97 } // namespace MessageList
98 
99 #endif
A set of aggregation options that can be applied to the MessageList::Model in a single shot...
Definition: aggregation.h:27
A widget that allows editing a single MessageList::Aggregation.
Core::Aggregation * editedAggregation() const
Returns the Aggregation currently edited by this AggregationEditor.
The base class for the OptionSet editors.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Nov 27 2020 23:15:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.