| 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_QTGUI_INSERTFRAGMENTDIALOG_H |
| 7 |
#define AVOGADRO_QTGUI_INSERTFRAGMENTDIALOG_H |
| 8 |
|
| 9 |
#include "avogadroqtguiexport.h" |
| 10 |
|
| 11 |
#include <QtWidgets/QDialog> |
| 12 |
|
| 13 |
namespace Avogadro { |
| 14 |
namespace QtGui { |
| 15 |
|
| 16 |
namespace Ui { |
| 17 |
class InsertFragmentDialog; |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* @brief Dialog to prompt a format and descriptor string. |
| 22 |
*/ |
| 23 |
class AVOGADROQTGUI_EXPORT InsertFragmentDialog : public QDialog |
| 24 |
{ |
| 25 |
Q_OBJECT |
| 26 |
|
| 27 |
public: |
| 28 |
explicit InsertFragmentDialog(QWidget* parent = nullptr, |
| 29 |
QString directory = "molecules"); |
| 30 |
~InsertFragmentDialog() override; |
| 31 |
|
| 32 |
QString fileName(); |
| 33 |
|
| 34 |
public Q_SLOTS: |
| 35 |
void refresh(); |
| 36 |
|
| 37 |
void filterTextChanged(const QString&); |
| 38 |
|
| 39 |
void activated(); |
| 40 |
|
| 41 |
void currentChanged(const QModelIndex& selected, |
| 42 |
const QModelIndex& deselected); |
| 43 |
|
| 44 |
Q_SIGNALS: |
| 45 |
void performInsert(const QString& fileName, bool crystal); |
| 46 |
|
| 47 |
private: |
| 48 |
Ui::InsertFragmentDialog* m_ui; |
| 49 |
|
| 50 |
class Private; |
| 51 |
Private* m_implementation; |
| 52 |
}; |
| 53 |
|
| 54 |
} // namespace QtGui |
| 55 |
} // namespace Avogadro |
| 56 |
#endif // AVOGADRO_QTGUI_InsertFragmentDIALOG_H |