File indexing completed on 2025-01-05 04:55:47
0001 /* -*- c++ -*- 0002 dnattributeorderconfigwidget.h 0003 0004 This file is part of libkleopatra, the KDE keymanagement library 0005 SPDX-FileCopyrightText: 2004 Klarälvdalens Datakonsult AB 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #pragma once 0011 0012 #include "kleo_export.h" 0013 0014 #include <QWidget> 0015 0016 class QTreeWidgetItem; 0017 0018 namespace Kleo 0019 { 0020 0021 class KLEO_EXPORT DNAttributeOrderConfigWidget : public QWidget 0022 { 0023 Q_OBJECT 0024 public: 0025 explicit DNAttributeOrderConfigWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {}); 0026 ~DNAttributeOrderConfigWidget() override; 0027 0028 QStringList attributeOrder() const; 0029 void setAttributeOrder(const QStringList &order); 0030 0031 Q_SIGNALS: 0032 void changed(); 0033 0034 // 0035 // only boring stuff below... 0036 // 0037 0038 private Q_SLOTS: 0039 void slotAvailableSelectionChanged(); 0040 void slotCurrentOrderSelectionChanged(); 0041 void slotDoubleUpButtonClicked(); 0042 void slotUpButtonClicked(); 0043 void slotDownButtonClicked(); 0044 void slotDoubleDownButtonClicked(); 0045 void slotLeftButtonClicked(); 0046 void slotRightButtonClicked(); 0047 0048 private: 0049 void takePlaceHolderItem(); 0050 void enableDisableButtons(QTreeWidgetItem *); 0051 0052 private: 0053 class DNAttributeOrderConfigWidgetPrivate; 0054 std::unique_ptr<DNAttributeOrderConfigWidgetPrivate> const d; 0055 0056 protected: 0057 virtual void virtual_hook(int, void *); 0058 }; 0059 0060 }