summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/kselectdatabasedlg.h
blob: 28c44d8b54ca209fce4facb68750b3beb2c8e62c (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
/***************************************************************************
                          kselectdatabase.h
                             -------------------
    copyright            : (C) 2005 by Tony Bloomfield
    author               : Tony Bloomfield
    email                : tonybloom@users.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KSELECTDATABASEDLG_H
#define KSELECTDATABASEDLG_H

// ----------------------------------------------------------------------------
// QT Includes
#include <tqlistbox.h>
#include <tqlineedit.h>
#include <tqlabel.h>

// ----------------------------------------------------------------------------
// KDE Includes
#include <kurl.h>

// ----------------------------------------------------------------------------
// Project Includes
#include "kselectdatabasedlgdecl.h"
#include "../mymoney/storage/mymoneystoragesql.h"
#include "kmymoney/kguiutils.h"

class KSelectDatabaseDlg : public KSelectDatabaseDlgDecl
{
Q_OBJECT
  TQ_OBJECT
public:
  KSelectDatabaseDlg(TQWidget *tqparent = 0, const char *name = 0);
  KSelectDatabaseDlg(KURL openURL, TQWidget *tqparent = 0, const char *name = 0);
  ~KSelectDatabaseDlg();
  /** Set the mode of this dialog
    * @param - openMode (IO_ReadWrite = open database; IO_WriteOnly = saveas database)
  **/
  void setMode(int openMode);
  /** Return URL of database
    * @return - pseudo-URL of database selected by user
  **/
  const KURL selectedURL();

public slots:
  void slotDriverSelected(TQListBoxItem *driver);
  void slotHelp();
  void slotGenerateSQL();
private:
  void setError();
  int m_mode;
  MyMoneyDbDrivers m_map;
  kMandatoryFieldGroup* m_requiredFields;
};

#endif