File indexing completed on 2022-11-29 12:50:43

0001 /*
0002     SPDX-FileCopyrightText: 2007 Carsten Niehaus <cniehaus@kde.org>
0003     SPDX-FileCopyrightText: 2006 Jerome Pansanel <j.pansanel@pansanel.net>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef OBCONVERTER_H
0009 #define OBCONVERTER_H
0010 
0011 #include "ui_obconverterwidget.h"
0012 
0013 #include <QDialog>
0014 
0015 // OpenBabel includes
0016 #include <openbabel/obconversion.h>
0017 
0018 /**
0019  * @author Carsten Niehaus
0020  * @author Jerome Pansanel
0021  */
0022 class KOpenBabel : public QDialog
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     /**
0028      * public constructor
0029      *
0030      * @param parent the parent widget
0031      */
0032     explicit KOpenBabel(QWidget *parent);
0033 
0034     /**
0035      * Destructor
0036      */
0037     virtual ~KOpenBabel();
0038 
0039     /**
0040      * Add file to the list
0041      */
0042     void addFile(const QString &filename);
0043 
0044 private:
0045     Ui::OBConverterWidget ui;
0046 
0047     OpenBabel::OBConversion *OBConvObject;
0048 
0049     QString File;
0050 
0051     /**
0052      * Setup the interface for the window
0053      */
0054     void setupWindow();
0055 
0056 private slots:
0057     /**
0058      * Add file to the list
0059      */
0060     void slotAddFile();
0061 
0062     /**
0063      * Select every file in the list
0064      */
0065     void slotSelectAll();
0066 
0067     /**
0068      * Delete file from the list
0069      */
0070     void slotDeleteFile();
0071 
0072     /**
0073      * Try to guess the input file type from the selection
0074      */
0075     void slotGuessInput();
0076 
0077     /**
0078      * Convert the file in the selected type
0079      */
0080     void slotConvert();
0081 
0082     /**
0083      * Open help page
0084      */
0085     void slotHelpRequested();
0086 };
0087 
0088 #endif // OBCONVERTER_H