File indexing completed on 2025-04-20 05:17:33
0001 // SPDX-License-Identifier: GPL-2.0-or-later 0002 // SPDX-FileCopyrightText: 2007 Dominik Seichter <domseichter@web.de> 0003 0004 #ifndef INSERTPARTFILENAMEDLG_H 0005 #define INSERTPARTFILENAMEDLG_H 0006 0007 #include <QDialog> 0008 0009 #include "ui_partfilenamewidget.h" 0010 0011 class QDialogButtonBox; 0012 0013 class InsertPartFilenameDlg : public QDialog 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 explicit InsertPartFilenameDlg(const QString &filename, QWidget *parent = nullptr); 0019 0020 /** 0021 * \returns the command to insert a substring of the original 0022 * filename into the new filename 0023 */ 0024 inline const QString &command() const; 0025 0026 private Q_SLOTS: 0027 void slotSelectionChanged(); 0028 void slotUpdateKRenameCommand(); 0029 0030 private: 0031 Ui::PartFilenameWidget m_widget; 0032 QDialogButtonBox *m_buttons; 0033 0034 QString m_command; 0035 int m_start; 0036 int m_end; 0037 }; 0038 0039 inline const QString &InsertPartFilenameDlg::command() const 0040 { 0041 return m_command; 0042 } 0043 0044 #endif // INSERTPARTFILENAMEDLG_H