kwave  18.07.70
K3BExportDialog.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * K3BExportDialog.cpp - Extended KwaveFileDialog for exporting to K3b
3  * -------------------
4  * begin : Thu Apr 13 2017
5  * copyright : (C) 2017 by Thomas Eschenbacher
6  * email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "config.h"
19 
20 #include <QString>
21 #include <QUrl>
22 
23 #include <KComboBox>
24 #include <KUrlComboBox>
25 
26 #include "libkwave/String.h"
27 
28 #include "K3BExportDialog.h"
29 #include "K3BExportWidget.h"
30 
31 //***************************************************************************
33  const QString &startDir,
34  const QString &filter,
35  QWidget *parent,
36  const QUrl &last_url,
37  const QString &last_ext,
38  QString &pattern,
39  bool selection_only,
40  bool have_selection,
43 )
44  :Kwave::FileDialog(startDir, Kwave::FileDialog::SaveFile, filter, parent,
45  last_url, last_ext),
46  m_widget(new(std::nothrow) Kwave::K3BExportWidget(
47  this, pattern, selection_only, have_selection,
48  export_location, overwrite_policy
49  ))
50 {
51  Q_ASSERT(m_widget);
53 }
54 
55 //***************************************************************************
57 {
58  if (m_widget) delete m_widget;
59  m_widget = Q_NULLPTR;
60 }
61 
62 // //***************************************************************************
64 {
65  Q_ASSERT(m_widget);
66  return (m_widget) ? m_widget->pattern() : _("");
67 }
68 
69 //***************************************************************************
71 {
72  Q_ASSERT(m_widget);
73  return (m_widget) ? m_widget->selectionOnly() : false;
74 }
75 
76 //***************************************************************************
79 {
80  Q_ASSERT(m_widget);
81  return (m_widget) ? m_widget->exportLocation() :
83 }
84 
85 //***************************************************************************
88 {
89  Q_ASSERT(m_widget);
90  return (m_widget) ? m_widget->overwritePolicy() :
92 }
93 
94 //***************************************************************************
95 //***************************************************************************
Kwave::K3BExportWidget * m_widget
Definition: App.h:33
void setCustomWidget(QWidget *widget)
Definition: FileDialog.cpp:340
Kwave::K3BExportPlugin::export_location_t exportLocation() const
K3BExportDialog(const QString &startDir, const QString &filter, QWidget *parent, const QUrl &last_url, const QString &last_ext, QString &pattern, bool selection_only, bool have_selection, Kwave::K3BExportPlugin::export_location_t export_location, Kwave::K3BExportPlugin::overwrite_policy_t overwrite_policy)
Kwave::K3BExportPlugin::export_location_t exportLocation() const
Kwave::K3BExportPlugin::overwrite_policy_t overwritePolicy() const
#define _(m)
Definition: memcpy.c:66
Kwave::K3BExportPlugin::overwrite_policy_t overwritePolicy() const