1 /****************************************************************************** 2 3 This source file is part of the Avogadro project. 4 5 Copyright 2013 Kitware, Inc. 6 7 This source code is released under the New BSD License, (the "License"). 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 15 ******************************************************************************/ 16 17 #ifndef AVOGADRO_QTPLUGINS_LINEFORMATINPUTDIALOG_H 18 #define AVOGADRO_QTPLUGINS_LINEFORMATINPUTDIALOG_H 19 20 #include <QtWidgets/QDialog> 21 22 namespace Avogadro { 23 namespace QtPlugins { 24 25 namespace Ui { 26 class LineFormatInputDialog; 27 } 28 29 /** 30 * @brief Dialog to prompt a format and descriptor string. 31 */ 32 class LineFormatInputDialog : public QDialog 33 { 34 Q_OBJECT 35 36 public: 37 explicit LineFormatInputDialog(QWidget* parent = 0); 38 ~LineFormatInputDialog() override; 39 40 void setFormats(const QStringList& indents); 41 QString format() const; 42 43 void setCurrentFormat(const QString& format); 44 45 QString descriptor() const; 46 47 protected slots: 48 void accept() override; 49 50 private: 51 Ui::LineFormatInputDialog* m_ui; 52 }; 53 54 } // namespace QtPlugins 55 } // namespace Avogadro 56 #endif // AVOGADRO_QTPLUGINS_LINEFORMATINPUTDIALOG_H 57