1 /* Copyright (c) 2015  Gerald Knizia
2  *
3  * This file is part of the IboView program (see: http://www.iboview.org)
4  *
5  * IboView is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, version 3.
8  *
9  * IboView is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with bfint (LICENSE). If not, see http://www.gnu.org/licenses/
16  *
17  * Please see IboView documentation in README.txt for:
18  * -- A list of included external software and their licenses. The included
19  *    external software's copyright is not touched by this agreement.
20  * -- Notes on re-distribution and contributions to/further development of
21  *    the IboView software
22  */
23 
24 #ifndef IV_SETTINGS_H
25 #define IV_SETTINGS_H
26 
27 #include <QWidget>
28 #include <QSplitter>
29 #include <QFileDialog>
30 
31 // all of those routines deal with saving some kinds of user settings in a persistent location.
32 
33 void IvSaveWindowSize(QString Key, QWidget *pWindow);
34 bool IvRestoreWindowSize(QString Key, QWidget *pWindow);
35 void IvSaveSplitterState(QString Key, QSplitter *pSplitter);
36 bool IvRestoreSplitterState(QString Key, QSplitter *pSplitter);
37 
38 void IvGuessSubDialogSize(QWidget *pWindow, double fDefaultVerticalScale = -1.);
39 
40 QString IvGetSaveFileName(QString HistoryName, QWidget *parent = 0, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = 0, QFileDialog::Options options = 0);
41 QStringList IvGetOpenFileNames(QString HistoryName, QWidget *parent = 0, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = 0, QFileDialog::Options options = 0);
42 
43 
44 #endif // IV_SETTINGS_H
45