"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2bFileDialog.h" (12 Feb 2021, 2270 Bytes) of package /linux/privat/cb2bib-2.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "c2bFileDialog.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.0.0_vs_2.0.1.

    1 /***************************************************************************
    2  *   Copyright (C) 2004-2021 by Pere Constans
    3  *   constans@molspaces.com
    4  *   cb2Bib version 2.0.1. Licensed under the GNU GPL version 3.
    5  *   See the LICENSE file that comes with this distribution.
    6  ***************************************************************************/
    7 #ifndef C2BFILEDIALOG_H
    8 #define C2BFILEDIALOG_H
    9 
   10 #include <QFileDialog>
   11 
   12 class c2bSettings;
   13 
   14 
   15 class c2bFileDialog : public QFileDialog
   16 {
   17 
   18     Q_OBJECT
   19 
   20 public:
   21     static QString getFilename(QWidget* parentw = 0, const QString& caption = QString(),
   22                                const QString& path = QString(), const QString& filter = QString());
   23     static QString getOpenFilename(QWidget* parentw = 0, const QString& caption = QString(),
   24                                    const QString& path = QString(), const QString& filter = QString());
   25     static QStringList getOpenFilenames(QWidget* parentw = 0, const QString& caption = QString(),
   26                                         const QString& path = QString(), const QString& filter = QString());
   27     static QString getSaveFilename(QWidget* parentw = 0, const QString& caption = QString(),
   28                                    const QString& path = QString(), const QString& filter = QString());
   29     static QString getExistingDirectory(QWidget* parentw = 0, const QString& caption = QString(),
   30                                         const QString& path = QString());
   31     static QString getSystemFilename(QWidget* parentw = 0, const QString& caption = QString(),
   32                                      const QString& path = QString(), const QString& filter = QString());
   33 
   34 
   35 private:
   36     c2bFileDialog(QWidget* parentw, const QString& caption, const QString& fpath, const QString& ffilter);
   37     ~c2bFileDialog();
   38 
   39     QString _current_file;
   40     QString fileName(const QString& path);
   41     c2bSettings* settings;
   42 
   43     static QString _caption(const QString& generic, const QString& caption);
   44     static QString _dirpath(const QString& path);
   45     static QString _filename(const QString& path);
   46     static QString _path(const QString& path);
   47     void readSettings();
   48     void writeSettings();
   49 
   50 
   51 private slots:
   52     void accept();
   53     void selectCurrentFile();
   54 };
   55 
   56 #endif