22 #include <QVBoxLayout>
23 #include <QContextMenuEvent>
71 if (
event->type()==QEvent::ChildAdded) {
73 for (QObject*
c : watched->children()) {
96 std::cerr<<
"installEventFilterRecursively: Child is NULL. Aborting."<<std::endl;
100 child->removeEventFilter(
this);
102 child->installEventFilter(
this);
103 for (QObject*
c : child->children())
110 : filteritem(
new FilterItem(the_dw)), dw(the_dw), frame(0), vboxLayout(0),channelwidget(cw),
111 unselectedmargin(0),selected(false),tabmanager(the_tabmanager) {}
123 return "background-color: rgba(0, 0, 255, 12%)";
128 : QDockWidget ( cw->unique_name(), 0 ),
m_d(
new Imp(this,cw,tm))
131 setObjectName(
"VP1DockWidget:"+cw->
name());
135 setAllowedAreas(Qt::TopDockWidgetArea);
136 setFeatures(VP1DockWidget::DockWidgetMovable | VP1DockWidget::DockWidgetFloatable);
142 m_d->
frame->setObjectName(
"VP1DockWidgetFrame");
143 cw->setObjectName(
"IVP1ChannelWidget:"+cw->
name());
148 QMargins marg =
m_d->
frame->contentsMargins();
149 Q_ASSERT(marg.left()==marg.top()&&marg.left()==marg.right()&&marg.left()==marg.bottom()&&
"Qt changed its margin behaviour for QFrame!!");
197 assert(nsysOnRefreshed<=nsysOn);
198 if (nsysOn==nsysOnRefreshed) {
204 assert(nsysOnRefreshed<nsysOn);
205 if (sysrefreshing.isEmpty()) {
231 m_d->
frame->setFrameShape(QFrame::StyledPanel);
244 m_d->
frame->setFrameShape(QFrame::NoFrame);
265 QDockWidget::contextMenuEvent (
event );
275 QAction* pFullScreenAction =
menu.addAction(
"Show &full Screen");
277 QAction* pRemoveAction =
menu.addAction(
"&Remove channel");
278 menu.addSeparator ();
279 QAction* pMoveChannelAction =
menu.addAction(
"&Move to tab");
282 QMenu menu_movechan(
this);
283 if (tablist.count()==1) {
284 menu_movechan.addAction(
"No other tabs available")->setEnabled(
false);
287 for (QString tab : tablist) {
289 menu_movechan.addAction(tab)->setData(
"MOVECHAN");
292 pMoveChannelAction->setMenu(&menu_movechan);
295 QAction * selAct =
menu.exec(
event->globalPos());
299 if (selAct==pFullScreenAction) {
303 if (selAct==pRemoveAction) {
307 if (selAct->data()==
"MOVECHAN") {
311 std::cout<<
"ERROR in VP1DockWidget::contextMenuEvent!!!!!"<<std::endl;
319 QDockWidget::resizeEvent(
event);