File indexing completed on 2024-04-21 16:32:36
0001 /*************************************************************************** 0002 tokensortmodedialog.h - description 0003 ------------------- 0004 begin : Wed Sep 15 2010 0005 copyright : (C) 2010 by Dominik Seichter 0006 email : domseichter@web.de 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef TOKEN_SORT_MODE_DIALOG_H 0019 #define TOKEN_SORT_MODE_DIALOG_H 0020 0021 #include <QDialog> 0022 0023 #include "ui_tokensortmodedialog.h" 0024 #include "krenametokensorter.h" 0025 0026 /** 0027 * This is a dialog to define custom sorting. 0028 */ 0029 class TokenSortModeDialog : public QDialog 0030 { 0031 Q_OBJECT 0032 public: 0033 explicit TokenSortModeDialog(KRenameTokenSorter::ESimpleSortMode eSortMode, QWidget *parent = nullptr); 0034 0035 /** 0036 * Get the currently selected sort mode. 0037 * @returns the sort mode 0038 */ 0039 KRenameTokenSorter::ESimpleSortMode getSortMode() const; 0040 0041 /** 0042 * Get the token selected by the user. 0043 * @returns the token 0044 */ 0045 QString getToken() const; 0046 0047 private: 0048 /** 0049 * Load all available tokens. 0050 */ 0051 void initTokens(); 0052 0053 private Q_SLOTS: 0054 0055 void slotEnableControls(); 0056 0057 private: 0058 Ui::TokenSortModeDialog m_dialog; 0059 }; 0060 0061 #endif // TOKEN_SORT_MODE_DIALOG_H