File indexing completed on 2024-12-22 05:00:57
0001 /* 0002 This file is part of KTnef. 0003 0004 SPDX-FileCopyrightText: 2002 Michael Goffioul <kdeprint@swing.be> 0005 SPDX-FileCopyrightText: 2012 Allen Winter <winter@kde.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 0009 You should have received a copy of the GNU General Public License 0010 along with this program; if not, write to the Free Software Foundation, 0011 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 0012 */ 0013 0014 #pragma once 0015 0016 #include <QTreeWidget> 0017 0018 namespace KTnef 0019 { 0020 class KTNEFAttach; 0021 } 0022 using namespace KTnef; 0023 0024 class KTNEFView : public QTreeWidget 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit KTNEFView(QWidget *parent = nullptr); 0030 ~KTNEFView() override; 0031 0032 void setAttachments(const QList<KTNEFAttach *> &list); 0033 QList<KTNEFAttach *> getSelection(); 0034 0035 Q_SIGNALS: 0036 void dragRequested(const QList<KTnef::KTNEFAttach *> &list); 0037 0038 protected: 0039 void resizeEvent(QResizeEvent *e) override; 0040 void startDrag(Qt::DropActions dropAction) override; 0041 0042 private: 0043 void adjustColumnWidth(); 0044 QList<KTNEFAttach *> mAttachments; 0045 };