summaryrefslogtreecommitdiffstats
path: root/src/exportdialog.h
blob: 644aa5631cfd501fe5dd5d0ad1cf19b9385adbcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/***************************************************************************
    copyright            : (C) 2003-2006 by Robby Stephenson
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of version 2 of the GNU General Public License as  *
 *   published by the Free Software Foundation;                            *
 *                                                                         *
 ***************************************************************************/

#ifndef EXPORTDIALOG_H
#define EXPORTDIALOG_H

class TQCheckBox;
class TQRadioButton;

#include "translators/translators.h"
#include "datavectors.h"

#include <kdialogbase.h>
#include <kurl.h>

namespace Tellico {
  namespace Export {
    class Exporter;
  }

/**
 * @author Robby Stephenson
 */
class ExportDialog : public KDialogBase {
TQ_OBJECT
  

public:
  ExportDialog(Export::Format format, Data::CollPtr coll, TQWidget* parent, const char* name);
  ~ExportDialog();

  TQString fileFilter();
  bool exportURL(const KURL& url=KURL()) const;

  static Export::Target exportTarget(Export::Format format);
  static bool exportCollection(Export::Format format, const KURL& url);

private slots:
  void slotSaveOptions();

private:
  static Export::Exporter* exporter(Export::Format format);

  void readOptions();

  Export::Format m_format;
  Data::CollPtr m_coll;
  Export::Exporter* m_exporter;
  TQCheckBox* m_formatFields;
  TQCheckBox* m_exportSelected;
  TQRadioButton* m_encodeUTF8;
  TQRadioButton* m_encodeLocale;
};

} // end namespace
#endif