file dialog improvements (bigger starting size)
parent
eb40b74234
commit
ec94dce150
2
notes
2
notes
|
@ -46,6 +46,8 @@ TODO {
|
|||
- indexer abstraction for audioports (assign/add std::pair<float, float>)
|
||||
maybe a similar abstraction for processing notes to what commandreader does
|
||||
|
||||
maybe interpolate between LUT levels
|
||||
|
||||
|
||||
bugs to fix {
|
||||
PLAYBACK BREAKS AFTER FIRST PLAY??? {
|
||||
|
|
|
@ -36,6 +36,8 @@ namespace {
|
|||
+ (static_cast<uint32_t>(major)<<24);
|
||||
}
|
||||
constexpr const uint32_t XYBRID_VERSION = packedVersion(0,0,0,1);
|
||||
|
||||
constexpr const QSize dlgSize(700, 500);
|
||||
}
|
||||
|
||||
const QString FileOps::Filter::project = qs("Xybrid project (*.xyp);;All files (*)");
|
||||
|
@ -45,16 +47,24 @@ const QString FileOps::Filter::audioIn = qs("Audio files (*.mp3, *.ogg, *.flac,
|
|||
const QString FileOps::Filter::audioOut = qs("MPEG Layer 3 (*.mp3)"); // only supported formats
|
||||
|
||||
QString FileOps::showOpenDialog(QWidget* parent, const QString& caption, const QString& directory, const QString& filter) {
|
||||
return QFileDialog::getOpenFileName(parent, caption, directory, filter); // just a wrapper for now
|
||||
QFileDialog dlg(parent, caption, directory, filter);
|
||||
dlg.resize(dlgSize);
|
||||
dlg.setFileMode(QFileDialog::ExistingFile);
|
||||
dlg.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
if (!dlg.exec()) return QString(); // canceled
|
||||
auto sf = dlg.selectedFiles();
|
||||
return sf[0];
|
||||
}
|
||||
|
||||
QString FileOps::showSaveAsDialog(QWidget* parent, const QString& caption, const QString& directory, const QString& filter, const QString& suffix) {
|
||||
QFileDialog dlg(parent, caption, directory, filter);
|
||||
dlg.resize(dlgSize);
|
||||
dlg.setDefaultSuffix(suffix);
|
||||
dlg.setFileMode(QFileDialog::AnyFile);
|
||||
dlg.setAcceptMode(QFileDialog::AcceptSave);
|
||||
if (!dlg.exec()) return QString(); // canceled
|
||||
return dlg.selectedFiles()[0];
|
||||
auto sf = dlg.selectedFiles();
|
||||
return sf[0];
|
||||
}
|
||||
|
||||
bool FileOps::saveProject(std::shared_ptr<Project> project, QString fileName) {
|
||||
|
|
Loading…
Reference in New Issue