~ubuntu-branches/ubuntu/saucy/qgis/saucy

« back to all changes in this revision

Viewing changes to src/app/qgscustomprojectiondialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          qgscustomprojectiondialog.h
 
3
 
 
4
                             -------------------
 
5
    begin                : 2005
 
6
    copyright            : (C) 2005 by Tim Sutton
 
7
    email                : tim@linfiniti.com
 
8
***************************************************************************/
 
9
 
 
10
/***************************************************************************
 
11
 *                                                                         *
 
12
 *   This program is free software; you can redistribute it and/or modify  *
 
13
 *   it under the terms of the GNU General Public License as published by  *
 
14
 *   the Free Software Foundation; either version 2 of the License, or     *
 
15
 *   (at your option) any later version.                                   *
 
16
 *                                                                         *
 
17
 ***************************************************************************/
 
18
#ifndef QGSCUSTOMCRSDIALOG_H
 
19
#define QGSCUSTOMCRSDIALOG_H
 
20
 
 
21
#include "ui_qgscustomprojectiondialogbase.h"
 
22
#include "qgscontexthelp.h"
 
23
 
 
24
class QDir;
 
25
 
 
26
/**
 
27
The custom projection widget is used to define the projection family, ellipsoid and paremters needed by proj4 to assemble a customised projection definition. The resulting projection will be store in an sqlite backend.
 
28
 
 
29
@author Tim Sutton
 
30
*/
 
31
class QgsCustomProjectionDialog : public QDialog, private Ui::QgsCustomProjectionDialogBase
 
32
{
 
33
    Q_OBJECT
 
34
  public:
 
35
    QgsCustomProjectionDialog( QWidget *parent = 0, Qt::WFlags fl = 0 );
 
36
    ~QgsCustomProjectionDialog();
 
37
    //a recursive function to make a directory and its ancestors
 
38
  public slots:
 
39
    void on_pbnCalculate_clicked();
 
40
    void on_pbnClose_clicked();
 
41
    void on_pbnDelete_clicked();
 
42
    //
 
43
    // Database navigation controles
 
44
    //
 
45
    long getRecordCount();
 
46
    void on_pbnFirst_clicked();
 
47
    void on_pbnPrevious_clicked();
 
48
    void on_pbnNext_clicked();
 
49
    void on_pbnLast_clicked();
 
50
    void on_pbnNew_clicked();
 
51
    void on_pbnSave_clicked();
 
52
 
 
53
    void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
 
54
 
 
55
    //
 
56
    // Control population
 
57
    //
 
58
    /* These two methods will be deprecated
 
59
    void getProjList();
 
60
    void getEllipsoidList();
 
61
    */
 
62
    QString getProjectionFamilyName( QString theProjectionFamilyAcronym );
 
63
    QString getEllipsoidName( QString theEllipsoidAcronym );
 
64
    QString getProjectionFamilyAcronym( QString theProjectionFamilyName );
 
65
    QString getEllipsoidAcronym( QString theEllipsoidName );
 
66
  private:
 
67
    QString getProjFromParameters();
 
68
    QString getEllipseFromParameters();
 
69
 
 
70
 
 
71
    QString mCurrentRecordId;
 
72
    long mCurrentRecordLong;
 
73
    //the record previous to starting an insert operation
 
74
    //so that we can return to it if the record insert is aborted
 
75
    long mLastRecordLong;
 
76
    long mRecordCountLong;
 
77
    const QString sqlSafeString( const QString theSQL );
 
78
 
 
79
};
 
80
 
 
81
#endif