* 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 <http://www.gnu.org/licenses/>.
*/
#include "viewitem.hpp"
#include <QPalette>
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const QSizeF ViewItem::LabelPadding(4, 0);
const int ViewItem::HighlightRadius = 3;
selected_ = select;
}
+bool ViewItem::is_draggable() const
+{
+ return true;
+}
+
bool ViewItem::dragging() const
{
return drag_point_.x() != INT_MIN && drag_point_.y() != INT_MIN;
void ViewItem::drag()
{
- drag_point_ = point(QRect());
+ if (is_draggable())
+ drag_point_ = point(QRect());
}
void ViewItem::drag_release()
return QRectF();
}
-QRectF ViewItem::hit_box_rect(const QRectF &rect) const
+QRectF ViewItem::hit_box_rect(const ViewItemPaintParams &pp) const
{
- (void)rect;
+ (void)pp;
return QRectF();
}
(void)hover;
}
-void ViewItem::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+void ViewItem::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
(void)p;
(void)pp;
}
-void ViewItem::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
+void ViewItem::paint_mid(QPainter &p, ViewItemPaintParams &pp)
{
(void)p;
(void)pp;
}
-void ViewItem::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
+void ViewItem::paint_fore(QPainter &p, ViewItemPaintParams &pp)
{
(void)p;
(void)pp;
return (background.lightness() > 110) ? Qt::black : Qt::white;
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv