1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

OP37/GCS Exposed DragButton

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@833 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
zedamota 2010-06-20 16:50:59 +00:00 committed by zedamota
parent 5d9fef8aaa
commit 375071d221
4 changed files with 8 additions and 4 deletions

View File

@ -8,6 +8,7 @@ Configuration::Configuration()
EmptyTileBorders = QPen(Qt::white);
ScalePen = QPen(Qt::blue);
SelectionPen = QPen(Qt::blue);
DragButton = Qt::RightButton;
}
void Configuration::SetAccessMode(core::AccessMode::Types const& type)
{

View File

@ -19,6 +19,8 @@ public:
QPen SelectionPen;
QFont MissingDataFont;
Qt::MouseButton DragButton;
void SetAccessMode(core::AccessMode::Types const& type);
core::AccessMode::Types AccessMode();
@ -28,7 +30,10 @@ public:
void SetUseMemoryCache(bool const& value){core::OPMaps::Instance()->setUseMemoryCache(value);}
bool UseMemoryCache(){return core::OPMaps::Instance()->UseMemoryCache();}
void SetCacheLocation(QString const& dir){core::Cache::Instance()->setCacheLocation(dir);}
void SetCacheLocation(QString const& dir){
core::Cache::Instance()->setCacheLocation(dir);
}
QString CacheLocation(){return core::Cache::Instance()->CacheLocation();}
};

View File

@ -5,7 +5,6 @@ namespace mapcontrol
{
showTileGridLines=false;
DragButton = Qt::RightButton;
isMouseOverMarker=false;
maprect=QRectF(0,0,1022,680);
core->SetCurrentRegion(internals::Rectangle(0, 0, maprect.width(), maprect.height()));
@ -84,7 +83,7 @@ namespace mapcontrol
{
if(!IsMouseOverMarker())
{
if(event->button() == DragButton && CanDragMap())
if(event->button() == config->DragButton && CanDragMap())
{
core->mouseDown.SetX(event->pos().x());
core->mouseDown.SetY(event->pos().y());

View File

@ -62,7 +62,6 @@ private:
int MaxZoom()const{return maxZoom;}
int MinZoom()const{return minZoom;}
internals::MouseWheelZoomType::Types GetMouseWheelZoomType(){return core->GetMouseWheelZoomType();}
Qt::MouseButton DragButton;
void SetSelectedArea(internals::RectLatLng const& value){selectedArea = value;this->update();}
internals::RectLatLng BoundsOfMap;
void Offset(int const& x, int const& y);