LMMS
Loading...
Searching...
No Matches
VersionedSaveDialog.h
Go to the documentation of this file.
1/*
2 * VersionedSaveDialog.h - declaration of class VersionedSaveDialog, a file save
3 * dialog that provides buttons to increment or decrement a version which is
4 * appended to the file name. (e.g. "MyProject-01.mmpz")
5 *
6 * Copyright (c) 2014 Lukas W <lukaswhl/at/gmail.com>
7 *
8 * This file is part of LMMS - https://lmms.io
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public
21 * License along with this program (see COPYING); if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 * Boston, MA 02110-1301 USA.
24 *
25 */
26
27#ifndef LMMS_GUI_VERSIONED_SAVE_DIALOG_H
28#define LMMS_GUI_VERSIONED_SAVE_DIALOG_H
29
30#include "FileDialog.h"
31#include "Song.h"
32
33class QLineEdit;
34
35namespace lmms::gui
36{
37
38class LedCheckBox;
39
48
50{
51 Q_OBJECT
52public:
53 explicit VersionedSaveDialog( QWidget *parent = 0,
54 QWidget *saveOptionsWidget = nullptr,
55 const QString &caption = QString(),
56 const QString &directory = QString(),
57 const QString &filter = QString() );
58
59 // Returns true if file name was changed, returns false if it wasn't
60 static bool changeFileNameVersion( QString &fileName, bool increment );
61 static bool fileExistsQuery( QString FileName, QString WindowTitle );
62
63public slots:
64 void incrementVersion();
65 void decrementVersion();
66};
67
68
69} // namespace lmms::gui
70
71#endif // LMMS_GUI_VERSIONED_SAVE_DIALOG_H
FileDialog(QWidget *parent=0, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString())
Definition FileDialog.cpp:41
Definition LedCheckBox.h:37
SaveOptionsWidget(Song::SaveOptions &saveOptions)
Definition VersionedSaveDialog.cpp:181
LedCheckBox * m_saveAsProjectBundleCheckbox
Definition VersionedSaveDialog.h:46
LedCheckBox * m_discardMIDIConnectionsCheckbox
Definition VersionedSaveDialog.h:45
VersionedSaveDialog(QWidget *parent=0, QWidget *saveOptionsWidget=nullptr, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString())
Definition VersionedSaveDialog.cpp:42
void incrementVersion()
Definition VersionedSaveDialog.cpp:132
static bool fileExistsQuery(QString FileName, QString WindowTitle)
Definition VersionedSaveDialog.cpp:160
void decrementVersion()
Definition VersionedSaveDialog.cpp:146
static bool changeFileNameVersion(QString &fileName, bool increment)
Definition VersionedSaveDialog.cpp:91
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223
Definition Song.h:82