Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit 0a0fa21ec4
  1. 2
      src/customWidgets/UBActionableWidget.h
  2. 22
      src/customWidgets/UBWidgetList.cpp

@ -24,7 +24,6 @@ public:
void removeAction(eAction act);
void removeAllActions();
void setActionsVisible(bool bVisible);
bool shouldClose(QPoint p);
signals:
void close(QWidget* w);
@ -32,7 +31,6 @@ signals:
protected:
void setActionsParent(QWidget* parent);
void unsetActionsParent();
void paintEvent(QPaintEvent* ev);
QVector<eAction> mActions;
QPushButton mCloseButtons;

@ -143,28 +143,15 @@ void UBWidgetList::mousePressEvent(QMouseEvent *ev)
if(mCanRemove){
QWidget* pWAt = widgetAt(ev->pos());
if(NULL != mpCurrentWidget){
if(pWAt == mpCurrentWidget){
// qDebug() << ev->x() << "," << ev->y();
// qDebug() << "mpCurrentWidget->pos() = " << mpCurrentWidget->pos().x() << "," << mpCurrentWidget->pos().y();
// qDebug() << "viewport position: " << visibleRegion().boundingRect().x() << "," << visibleRegion().boundingRect().y();
// QPoint p;
// p.setX(ev->x() - mpCurrentWidget->pos().x());
// p.setY(ev->y() - mpCurrentWidget->pos().y());
// if(mpCurrentWidget->shouldClose(p)){
// emit closeWidget(mpCurrentWidget);
// return;
// }
}else{
if(pWAt != mpCurrentWidget){
mpCurrentWidget->setActionsVisible(false);
update();
}
}
mpCurrentWidget = dynamic_cast<UBActionableWidget*>(pWAt);
if(NULL != mpCurrentWidget){
mpCurrentWidget->setActionsVisible(true);
update();
}
}
update();
@ -240,6 +227,3 @@ bool UBWidgetList::empty()
{
return mWidgetInfo.empty();
}
// TODO : - add onHover 'delete' button

Loading…
Cancel
Save