File indexing completed on 2024-04-21 05:51:42

0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 // SPDX-FileCopyrightText: 2007 Dominik Seichter <domseichter@web.de>
0003 
0004 #ifndef FIRSTSTARTDLG_H
0005 #define FIRSTSTARTDLG_H
0006 
0007 #include <QDialog>
0008 
0009 #include "ui_guimodeselector.h"
0010 #include "krenamewindow.h" // for EGuiMode
0011 
0012 class QDialogButtonBox;
0013 
0014 /**
0015  * This dialog is shown when KRename is started the first time.
0016  * The user can select whether he wants to use KRename
0017  * in "Assistant" or "Advanced" mode.
0018  *
0019  * It is a thin wrapper around GuiModeSelector and a QDialogButtonBox
0020  * so that the user has an OK button.
0021  */
0022 class FirstStartDlg : public QDialog
0023 {
0024 public:
0025     explicit FirstStartDlg(QWidget *parent = nullptr);
0026 
0027     /**
0028      * @returns the selected Gui Mode
0029      */
0030     inline EGuiMode guiMode() const;
0031 
0032 private:
0033     Ui::GuiModeSelector m_selector;
0034     QDialogButtonBox   *m_buttons;
0035 };
0036 
0037 EGuiMode FirstStartDlg::guiMode() const
0038 {
0039     return m_selector.optionWizard->isChecked() ? eGuiMode_Wizard : eGuiMode_Advanced;
0040 }
0041 
0042 #endif // FIRSTSTARTDLG_H