selection.cpp
changeset 721 12958f987bcf
parent 651 1e51ba080947
child 723 11f9124c1cca
     1.1 --- a/selection.cpp	Wed Jul 16 10:44:44 2008 +0000
     1.2 +++ b/selection.cpp	Wed Jul 16 10:46:14 2008 +0000
     1.3 @@ -13,6 +13,7 @@
     1.4  Selection::Selection()
     1.5  {
     1.6  	color= QColor(255,255,0);
     1.7 +	blocked=false;
     1.8  }
     1.9  
    1.10  Selection::~Selection()
    1.11 @@ -37,7 +38,7 @@
    1.12  	lastSelectList.clear();
    1.13  }
    1.14  
    1.15 -void Selection::update()
    1.16 +void Selection::update() // FIXME this needs to be adapted to several views
    1.17  {
    1.18  	QRectF bbox;
    1.19  	int w=0;
    1.20 @@ -120,6 +121,21 @@
    1.21  	}	
    1.22  }
    1.23  
    1.24 +bool Selection::isBlocked()
    1.25 +{
    1.26 +	return blocked;
    1.27 +}
    1.28 +
    1.29 +void Selection::block()
    1.30 +{
    1.31 +	blocked=true;
    1.32 +}
    1.33 +
    1.34 +void Selection::unblock()
    1.35 +{
    1.36 +	blocked=false;
    1.37 +}
    1.38 +
    1.39  bool Selection::isEmpty()
    1.40  {
    1.41  	return selectList.isEmpty();