| 1 |
/****************************************************************************** |
| 2 |
This source file is part of the Avogadro project. |
| 3 |
This source code is released under the 3-Clause BSD License, (see "LICENSE"). |
| 4 |
******************************************************************************/ |
| 5 |
|
| 6 |
#ifndef AVOGADRO_QTPLUGINS_LINEFORMATINPUTDIALOG_H |
| 7 |
#define AVOGADRO_QTPLUGINS_LINEFORMATINPUTDIALOG_H |
| 8 |
|
| 9 |
#include <QtWidgets/QDialog> |
| 10 |
|
| 11 |
namespace Avogadro { |
| 12 |
namespace QtPlugins { |
| 13 |
|
| 14 |
namespace Ui { |
| 15 |
class LineFormatInputDialog; |
| 16 |
} |
| 17 |
|
| 18 |
/** |
| 19 |
* @brief Dialog to prompt a format and descriptor string. |
| 20 |
*/ |
| 21 |
class LineFormatInputDialog : public QDialog |
| 22 |
{ |
| 23 |
Q_OBJECT |
| 24 |
|
| 25 |
public: |
| 26 |
explicit LineFormatInputDialog(QWidget* parent = nullptr); |
| 27 |
~LineFormatInputDialog() override; |
| 28 |
|
| 29 |
void setFormats(const QStringList& indents); |
| 30 |
QString format() const; |
| 31 |
|
| 32 |
void setCurrentFormat(const QString& format); |
| 33 |
|
| 34 |
void setDescriptor(const QString& descriptor); |
| 35 |
|
| 36 |
QString descriptor() const; |
| 37 |
|
| 38 |
protected slots: |
| 39 |
void accept() override; |
| 40 |
|
| 41 |
private: |
| 42 |
Ui::LineFormatInputDialog* m_ui; |
| 43 |
}; |
| 44 |
|
| 45 |
} // namespace QtPlugins |
| 46 |
} // namespace Avogadro |
| 47 |
#endif // AVOGADRO_QTPLUGINS_LINEFORMATINPUTDIALOG_H |