File indexing completed on 2024-05-12 16:01:46
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2005-2006 Peter Simonsson <psn@linux.se> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef KISDETAILSPANE_H 0007 #define KISDETAILSPANE_H 0008 0009 #include "ui_KisDetailsPaneBase.h" 0010 0011 class QEvent; 0012 class QUrl; 0013 class QStandardItemModel; 0014 0015 struct KisDetailsPanePrivate; 0016 0017 class KisDetailsPane : public QWidget, public Ui_KisDetailsPaneBase 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 KisDetailsPane(QWidget* parent, const QString& header); 0023 ~KisDetailsPane() override; 0024 0025 bool eventFilter(QObject* watched, QEvent* e) override; 0026 0027 /// @return the model used in the document list 0028 QStandardItemModel* model() const; 0029 0030 Q_SIGNALS: 0031 /// Emitted when a file is requested to be opened 0032 void openUrl(const QUrl&); 0033 0034 /// This is used to keep all splitters in different details panes synced 0035 void splitterResized(KisDetailsPane* sender, const QList<int>& sizes); 0036 0037 public Q_SLOTS: 0038 /// This is used to keep all splitters in different details panes synced 0039 void resizeSplitter(KisDetailsPane* sender, const QList<int>& sizes); 0040 0041 protected Q_SLOTS: 0042 /// This is called when the selection in the listview changed 0043 virtual void selectionChanged(const QModelIndex& index) = 0; 0044 virtual void openFile(); 0045 virtual void openFile(const QModelIndex& index) = 0; 0046 0047 void changePalette(); 0048 0049 protected: 0050 enum Extents { 0051 IconExtent = 64, 0052 PreviewExtent = 128 0053 }; 0054 0055 private: 0056 KisDetailsPanePrivate * const d; 0057 }; 0058 0059 #endif //KODETAILSPANE_H