~ubuntu-branches/ubuntu/vivid/kate/vivid-proposed

« back to all changes in this revision

Viewing changes to addons/kate/katesql/connectionwizard.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
   Copyright (C) 2010  Marco Mentasti  <marcomentasti@gmail.com>
3
 
 
4
 
   This library is free software; you can redistribute it and/or
5
 
   modify it under the terms of the GNU Library General Public
6
 
   License version 2 as published by the Free Software Foundation.
7
 
 
8
 
   This library is distributed in the hope that it will be useful,
9
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
   Library General Public License for more details.
12
 
 
13
 
   You should have received a copy of the GNU Library General Public License
14
 
   along with this library; see the file COPYING.LIB.  If not, write to
15
 
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
 
   Boston, MA 02110-1301, USA.
17
 
*/
18
 
 
19
 
#ifndef CONNECTIONWIZARD_H
20
 
#define CONNECTIONWIZARD_H
21
 
 
22
 
class SQLManager;
23
 
class KComboBox;
24
 
class KLineEdit;
25
 
class KIntSpinBox;
26
 
class KUrlRequester;
27
 
 
28
 
#include "connection.h"
29
 
 
30
 
#include <kwallet.h>
31
 
#include <qwizard.h>
32
 
 
33
 
class ConnectionWizard : public QWizard
34
 
{
35
 
  public:
36
 
 
37
 
    enum
38
 
    {
39
 
      Page_Driver,
40
 
      Page_Standard_Server,
41
 
      Page_SQLite_Server,
42
 
      Page_Save
43
 
    };
44
 
 
45
 
    ConnectionWizard(SQLManager *manager, Connection *conn, QWidget *parent=0, Qt::WindowFlags flags = 0);
46
 
    ~ConnectionWizard();
47
 
 
48
 
    SQLManager *manager() { return m_manager; }
49
 
    Connection *connection() { return m_connection; }
50
 
 
51
 
  private:
52
 
    SQLManager *m_manager;
53
 
    Connection *m_connection;
54
 
};
55
 
 
56
 
 
57
 
class ConnectionDriverPage : public QWizardPage
58
 
{
59
 
  public:
60
 
    ConnectionDriverPage(QWidget *parent=0);
61
 
    void initializePage();
62
 
    int nextId() const;
63
 
 
64
 
  private:
65
 
    KComboBox *driverComboBox;
66
 
};
67
 
 
68
 
class ConnectionStandardServerPage : public QWizardPage
69
 
{
70
 
  public:
71
 
    ConnectionStandardServerPage(QWidget *parent=0);
72
 
    ~ConnectionStandardServerPage();
73
 
    void initializePage();
74
 
    virtual bool validatePage();
75
 
    int nextId() const;
76
 
 
77
 
  private:
78
 
    KLineEdit *hostnameLineEdit;
79
 
    KLineEdit *usernameLineEdit;
80
 
    KLineEdit *passwordLineEdit;
81
 
    KLineEdit *databaseLineEdit;
82
 
    KLineEdit *optionsLineEdit;
83
 
    KIntSpinBox *portSpinBox;
84
 
};
85
 
 
86
 
class ConnectionSQLiteServerPage : public QWizardPage
87
 
{
88
 
  public:
89
 
    ConnectionSQLiteServerPage(QWidget *parent=0);
90
 
    void initializePage();
91
 
    virtual bool validatePage();
92
 
    int nextId() const;
93
 
 
94
 
  private:
95
 
//     KLineEdit *pathLineEdit;
96
 
    KUrlRequester *pathUrlRequester;
97
 
 
98
 
    KLineEdit *optionsLineEdit;
99
 
};
100
 
 
101
 
class ConnectionSavePage : public QWizardPage
102
 
{
103
 
  public:
104
 
    ConnectionSavePage(QWidget *parent=0);
105
 
    void initializePage();
106
 
    virtual bool validatePage();
107
 
    int nextId() const;
108
 
 
109
 
  private:
110
 
    KLineEdit *connectionNameLineEdit;
111
 
};
112
 
 
113
 
#endif // CONNECTIONWIZARD_H