File indexing completed on 2024-06-23 05:48:55
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007-2008 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_STRINGSEXTRACTVIEW_HPP 0010 #define KASTEN_STRINGSEXTRACTVIEW_HPP 0011 0012 // Qt 0013 #include <QWidget> 0014 0015 class QTreeView; 0016 class QSortFilterProxyModel; 0017 class QModelIndex; 0018 class QSpinBox; 0019 class QAction; 0020 0021 namespace Kasten { 0022 0023 class StringsExtractTool; 0024 class ContainedStringTableModel; 0025 0026 class StringsExtractView : public QWidget 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 explicit StringsExtractView(StringsExtractTool* tool, QWidget* parent = nullptr); 0032 ~StringsExtractView() override; 0033 0034 public: 0035 StringsExtractTool* tool() const; 0036 0037 public: // QObject API 0038 bool eventFilter(QObject* object, QEvent* event) override; 0039 0040 private Q_SLOTS: // gui 0041 void onStringDoubleClicked(const QModelIndex& index); 0042 void onStringSelectionChanged(); 0043 void onGotoButtonClicked(); 0044 void onCopyButtonClicked(); 0045 0046 private Q_SLOTS: // tool 0047 void onStringsUptodateChanged(bool stringsUptodate); 0048 void onApplyableChanged(bool isApplyable); 0049 void onCanHighlightStringChanged(bool canHighlightString); 0050 0051 private: 0052 StringsExtractTool* mTool; 0053 0054 ContainedStringTableModel* mContainedStringTableModel; 0055 QSortFilterProxyModel* mSortFilterProxyModel; 0056 0057 QTreeView* mContainedStringTableView; 0058 QSpinBox* mMinLengthSpinBox; 0059 QAction* mUpdateAction; 0060 QAction* mCopyAction; 0061 QAction* mGotoAction; 0062 }; 0063 0064 inline StringsExtractTool* StringsExtractView::tool() const { return mTool; } 0065 0066 } 0067 0068 #endif