X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fviewitem.cpp;h=05e14164b338b145160e981fbd395f736d7a6eee;hb=26a883ede0bcf68d087eda5dd2082890d36c7aef;hp=a63d4d38ed7a3c6932f891883ab8918df70097cc;hpb=cbf0f87e496c9d9157591c94dc445aaa960fe79d;p=pulseview.git
diff --git a/pv/view/viewitem.cpp b/pv/view/viewitem.cpp
index a63d4d3..05e1416 100644
--- a/pv/view/viewitem.cpp
+++ b/pv/view/viewitem.cpp
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#include "viewitem.hpp"
@@ -27,7 +26,8 @@
#include
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const QSizeF ViewItem::LabelPadding(4, 0);
const int ViewItem::HighlightRadius = 3;
@@ -49,6 +49,11 @@ void ViewItem::select(bool select)
selected_ = select;
}
+bool ViewItem::is_draggable() const
+{
+ return true;
+}
+
bool ViewItem::dragging() const
{
return drag_point_.x() != INT_MIN && drag_point_.y() != INT_MIN;
@@ -56,7 +61,8 @@ bool ViewItem::dragging() const
void ViewItem::drag()
{
- drag_point_ = point(QRect());
+ if (is_draggable())
+ drag_point_ = point(QRect());
}
void ViewItem::drag_release()
@@ -129,5 +135,6 @@ QColor ViewItem::select_text_colour(QColor background)
return (background.lightness() > 110) ? Qt::black : Qt::white;
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv