mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Bookmark item class. A bookmark item is stored as a record in the users database
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@3211 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
2cfff3c90e
commit
fb11503547
39
src/qgsbookmarkitem.cpp
Normal file
39
src/qgsbookmarkitem.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
/***************************************************************************
|
||||
QgsBookmarkItem.h - Spatial Bookmark Item
|
||||
-------------------
|
||||
begin : 2005-04-23
|
||||
copyright : (C) 2005 Gary Sherman
|
||||
email : sherman at mrcc dot com
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
/* $Id$ */
|
||||
#include <iostream>
|
||||
#include <sqlite3.h>
|
||||
#include <qstring.h>
|
||||
|
||||
#include "qgsrect.h"
|
||||
#include "qgsbookmarkitem.h"
|
||||
|
||||
QgsBookmarkItem::QgsBookmarkItem(QString name, QString projectTitle,
|
||||
QgsRect viewExtent, int srid, QString dbPath)
|
||||
: mName(name), mProjectTitle(projectTitle), mViewExtent(viewExtent),
|
||||
mSrid(srid), mDbPath(dbPath)
|
||||
{
|
||||
}
|
||||
QgsBookmarkItem::~QgsBookmarkItem()
|
||||
{
|
||||
}
|
||||
void QgsBookmarkItem::store()
|
||||
{
|
||||
std::cout << "Storing bookmark" << std::endl;
|
||||
}
|
||||
|
52
src/qgsbookmarkitem.h
Normal file
52
src/qgsbookmarkitem.h
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
/***************************************************************************
|
||||
QgsBookmarkItem.h - Spatial Bookmark Item
|
||||
-------------------
|
||||
begin : 2005-04-23
|
||||
copyright : (C) 2005 Gary Sherman
|
||||
email : sherman at mrcc dot com
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
/* $Id$ */
|
||||
#ifndef QGSBOOKMARKITEM_H
|
||||
#define QGSBOOKMARKITEM_H
|
||||
class QString;
|
||||
class QgsRect;
|
||||
/*!
|
||||
* \class QgsBookmarkItem
|
||||
* \brief A spatial bookmark record that is stored in a sqlite3
|
||||
* database.
|
||||
*/
|
||||
class QgsBookmarkItem
|
||||
{
|
||||
public:
|
||||
//! Constructs a bookmark item
|
||||
QgsBookmarkItem(QString name, QString projectTitle,
|
||||
QgsRect viewExtent, int srid, QString databasePath);
|
||||
//! Default destructor
|
||||
~QgsBookmarkItem();
|
||||
//! Store the bookmark in the database
|
||||
void store();
|
||||
private:
|
||||
//! Name of the bookmark
|
||||
QString mName;
|
||||
//! Project that this bookmark was created from
|
||||
QString mProjectTitle;
|
||||
//! Extent of the view for the bookmark
|
||||
QgsRect mViewExtent;
|
||||
//! SRID of the canvas coordinate system when the bookmark was created
|
||||
int mSrid;
|
||||
//! Full path to the user database
|
||||
QString mDbPath;
|
||||
|
||||
};
|
||||
|
||||
#endif // QGSBOOKMARKITEM_H
|
Loading…
x
Reference in New Issue
Block a user