File indexing completed on 2024-04-21 16:32:30

0001 /***************************************************************************
0002                        firststartdlg.h  -  description
0003                              -------------------
0004     begin                : Sat Mar 24 2007
0005     copyright            : (C) 2007 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 FIRSTSTARTDLG_H
0019 #define FIRSTSTARTDLG_H
0020 
0021 #include <QDialog>
0022 
0023 #include "ui_guimodeselector.h"
0024 #include "krenamewindow.h" // for EGuiMode
0025 
0026 class QDialogButtonBox;
0027 
0028 /**
0029  * This dialog is shown when KRename is started the first time.
0030  * The user can select whether he wants to use KRename
0031  * in "Assistant" or "Advanced" mode.
0032  *
0033  * It is a thin wrapper around GuiModeSelector and a QDialogButtonBox
0034  * so that the user has an OK button.
0035  */
0036 class FirstStartDlg : public QDialog
0037 {
0038 public:
0039     explicit FirstStartDlg(QWidget *parent = nullptr);
0040 
0041     /**
0042      * @returns the selected Gui Mode
0043      */
0044     inline EGuiMode guiMode() const;
0045 
0046 private:
0047     Ui::GuiModeSelector m_selector;
0048     QDialogButtonBox   *m_buttons;
0049 };
0050 
0051 EGuiMode FirstStartDlg::guiMode() const
0052 {
0053     return m_selector.optionWizard->isChecked() ? eGuiMode_Wizard : eGuiMode_Advanced;
0054 }
0055 
0056 #endif // FIRSTSTARTDLG_H