bool DeclarativeWidgetExtension::eventFilter(QObject *watched, QEvent *event) { Q_ASSERT(watched == parent()); Q_UNUSED(watched); // release builds switch (event->type()) { case QEvent::Move: emit posChanged(); emit geometryChanged(); break; case QEvent::Resize: emit sizeChanged(); emit geometryChanged(); break; case QEvent::Show: case QEvent::Hide: emit visibleChanged(isVisible()); break; default: break; } return false; }
QT_BEGIN_NAMESPACE QDesignerFormWindow::QDesignerFormWindow(QDesignerFormWindowInterface *editor, QDesignerWorkbench *workbench, QWidget *parent, Qt::WindowFlags flags) : QWidget(parent, flags), m_editor(editor), m_workbench(workbench), m_action(new QAction(this)), m_initialized(false), m_windowTitleInitialized(false) { Q_ASSERT(workbench); setMaximumSize(0xFFF, 0xFFF); if (m_editor) { m_editor->setParent(this); } else { m_editor = workbench->core()->formWindowManager()->createFormWindow(this); } QVBoxLayout *l = new QVBoxLayout(this); l->setMargin(0); l->addWidget(m_editor); m_action->setCheckable(true); connect(m_editor->commandHistory(), SIGNAL(indexChanged(int)), this, SLOT(updateChanged())); connect(m_editor, SIGNAL(geometryChanged()), this, SLOT(geometryChanged())); connect(m_editor, SIGNAL(activated(QWidget *)), this, SLOT(widgetActivated(QWidget *))); }
QseWidget::QseWidget(QWidget *parent) : QWidget(parent) { // selection m_selection = new QseSelection(this); m_selectionPlot = new QseSelectionPlot(this); m_selectionPlot->setSelection(m_selection); // position cursor m_positionCursor = new QseCursor(this); m_positionCursorPlot = new QseCursorPlot(this); m_positionCursorPlot->setCursor(m_positionCursor); // play cursor m_playCursor = new QseCursor(this); m_playCursorPlot = new QseCursorPlot(this); m_playCursorPlot->setPen(QPen(Qt::darkGreen)); m_playCursorPlot->setCursor(m_playCursor); // scroll bar m_scrollBar = new QseScrollBar(this); m_scrollBar->hide(); connect(m_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotScrollBarValueChanged(int))); // time widget && controller m_timeController = new QseHorizontalController(this); m_timeWidget = new QseAxisWidget(QseAxisWidget::Top, this); m_timeProvider = new QseTimeMetricProvider(m_timeWidget); m_timeWidget->setController(m_timeController); m_timeWidget->setMetricProvider(m_timeProvider); m_timeWidget->hide(); connect(m_timeController, SIGNAL(geometryChanged(QseGeometry)), this, SLOT(setGeometry(QseGeometry))); // amplitude controller m_amplitudeController = new QseVerticalController(this); connect(m_amplitudeController, SIGNAL(geometryChanged(QseGeometry)), this, SLOT(setGeometry(QseGeometry))); // waveform controller m_waveformController = new QsePlotController(this); m_waveformController->setPosition(m_positionCursor); m_waveformController->setSelection(m_selection); connect(m_waveformController, SIGNAL(geometryChanged(QseGeometry)), this, SLOT(setGeometry(QseGeometry))); connect(m_waveformController, SIGNAL(playClicked(qint64)), this, SLOT(slotPlayClicked(qint64))); // in the thread will be calculated the all peak and somthing else m_readerThread = new QThread(this); m_readerThread->start(); }
void FrameBook::init() { api=new FbApi(this); api->id="317511414947451"; connect(api,SIGNAL(picsLoaded()),this,SLOT(nextImage())); connect(api,SIGNAL(picLoaded(QString*)),this,SLOT(setImage(QString*))); connect(this,SIGNAL(geometryChanged()),this,SLOT(setImgSize())); setImgSize(); layout=new QGraphicsLinearLayout(Qt::Vertical,this); nextBtn = new Plasma::PushButton(this); nextBtn->setMaximumHeight(25); timer=new QTimer(this); timeout=5000; connect(timer,SIGNAL(timeout()),this,SLOT(nextImage())); nextBtn->setText("Next Image"); image=new Plasma::Label(this); connect(nextBtn,SIGNAL(clicked()),this,SLOT(nextImage())); layout->addItem(image); layout->addItem(nextBtn); layout->setAlignment(image,Qt::AlignHCenter); setLayout(layout); nextImage(); api->authenticate(); }
ChatWindow* QtChatWindowFactory::createChatWindow(const JID &contact,UIEventStream* eventStream) { if (!theme_) { theme_ = new QtChatTheme(themePath_); if (theme_->getIncomingContent().isEmpty()) { delete theme_; theme_ = new QtChatTheme(":/themes/Default/"); /* Use the inbuilt theme */ } } QtChatWindow* chatWindow = new QtChatWindow(P2QSTRING(contact.toString()), theme_, eventStream, settings_, emoticons_); connect(chatWindow, SIGNAL(splitterMoved()), this, SLOT(handleSplitterMoved())); connect(this, SIGNAL(changeSplitterState(QByteArray)), chatWindow, SLOT(handleChangeSplitterState(QByteArray))); QVariant splitterState = qtOnlySettings_->getQSettings()->value(SPLITTER_STATE); if(splitterState.isValid()) { chatWindow->handleChangeSplitterState(splitterState.toByteArray()); } if (tabs_) { tabs_->addTab(chatWindow); } else { QVariant chatGeometryVariant = qtOnlySettings_->getQSettings()->value(CHAT_TABS_GEOMETRY); if (chatGeometryVariant.isValid()) { chatWindow->restoreGeometry(chatGeometryVariant.toByteArray()); } connect(chatWindow, SIGNAL(geometryChanged()), this, SLOT(handleWindowGeometryChanged())); } return chatWindow; }
void LLFloaterWebContent::open_media(const Params& p) { // Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin. LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, HTTP_CONTENT_TEXT_HTML); mWebBrowser->setTarget(p.target); mWebBrowser->navigateTo(p.url, HTTP_CONTENT_TEXT_HTML, p.clean_browser); set_current_url(p.url); getChild<LLLayoutPanel>("status_bar")->setVisible(p.show_chrome); getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome); bool address_entry_enabled = p.allow_address_entry && !p.trusted_content; mAllowNavigation = p.allow_back_forward_navigation; getChildView("address")->setEnabled(address_entry_enabled); getChildView("popexternal")->setEnabled(address_entry_enabled); if (!p.show_chrome) { setResizeLimits(100, 100); } if (!p.preferred_media_size().isEmpty()) { getChild<LLLayoutStack>("stack1")->updateLayout(); LLRect browser_rect = mWebBrowser->calcScreenRect(); LLCoordWindow window_size; getWindow()->getSize(&window_size); geometryChanged(browser_rect.mLeft, window_size.mY - browser_rect.mTop, p.preferred_media_size().getWidth(), p.preferred_media_size().getHeight()); } }
void PlasmoidWrapper::setApplet(QObject *extender) { Plasma::Extender *appletExtender = static_cast<Plasma::Extender *>(extender); if(appletExtender){ Plasma::Applet *applet = appletExtender->applet(); if(applet){ Plasma::PackageStructure::Ptr structure = Plasma::Applet::packageStructure(); const QString workflowPath = KGlobal::dirs()->locate("data", structure->defaultPackageRoot() + "/workflow/"); Plasma::Package package(workflowPath, structure); m_version = package.metadata().version(); emit versionChanged(m_version); m_popupApplet = static_cast<Plasma::PopupApplet *>(applet); if(m_popupApplet->containment()){ m_isInPanel = (m_popupApplet->containment()->containmentType() == Plasma::Containment::PanelContainment); emit isInPanelChanged(m_isInPanel); connect(m_popupApplet,SIGNAL(geometryChanged()),this,SLOT(geometryChangedSlot())); connect(KWindowSystem::self(),SIGNAL(activeWindowChanged(WId)),this,SLOT(activeWindowChangedSlot(WId))); } } delete extender; } }
void AbstractGroupPrivate::addChild(QGraphicsWidget *child) { QPointF newPos = q->mapFromItem(child->parentItem(), child->pos()); if (groupType == AbstractGroup::ConstrainedGroup) { child->setTransform(QTransform()); } else { QTransform t(child->itemTransform(q)); if (t.m11() != 0) { qreal angle = (t.m12() > 0 ? acos(t.m11()) : -acos(t.m11())); QTransform at; QSizeF size(child->size()); at.translate(size.width() / 2, size.height() / 2); at.rotateRadians(angle); at.translate(-size.width() / 2, -size.height() / 2); child->setTransform(at); newPos -= QPointF(at.dx(), at.dy()); } } child->setParentItem(q); child->setProperty("group", QVariant::fromValue(q)); child->setPos(newPos); if (groupType == AbstractGroup::FreeGroup) { q->connect(child, SIGNAL(geometryChanged()), q, SLOT(onChildGeometryChanged())); } }
PanelAppletOverlay::PanelAppletOverlay(Plasma::Applet *applet, QWidget *parent) : QWidget(parent), m_applet(applet), m_spacer(0), m_layout(dynamic_cast<QGraphicsLinearLayout*>(applet->containment()->layout())), // ++assumptions; m_index(0), m_clickDrag(false) { if (!s_appletHandle) { s_appletHandle = new PanelAppletHandle(); } ++s_appletHandleCount; connect(s_appletHandle, SIGNAL(mousePressed(Plasma::Applet*,QMouseEvent*)), this, SLOT(handleMousePressed(Plasma::Applet*,QMouseEvent*))); connect(s_appletHandle, SIGNAL(mouseMoved(Plasma::Applet*,QMouseEvent*)), this, SLOT(handleMouseMoved(Plasma::Applet*,QMouseEvent*))); connect(s_appletHandle, SIGNAL(mouseReleased(Plasma::Applet*,QMouseEvent*)), this, SLOT(handleMouseReleased(Plasma::Applet*,QMouseEvent*))); syncIndex(); syncOrientation(); syncGeometry(); setMouseTracking(true); connect(m_applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed())); connect(m_applet, SIGNAL(geometryChanged()), this, SLOT(delaySyncGeometry())); }
void IRNowPlayingView::initWidget() { LOG_METHOD; iStationLogo = qobject_cast<HbLabel *> (iLoader.findObject(NOW_PLAYING_VIEW_OBJECT_STATION_LOGO)); iSongNameLabel = qobject_cast<HbLabel *> (iLoader.findObject(NOW_PLAYING_VIEW_OBJECT_SONG_NAME_LABEL)); iSongNameMarquee = qobject_cast<HbMarqueeItem *> (iLoader.findObject(NOW_PLAYING_VIEW_OBJECT_SONG_NAME_MARQUEE)); iSongNameMarquee->setLoopCount(-1); iArtistName = qobject_cast<HbLabel *> (iLoader.findObject(NOW_PLAYING_VIEW_OBJECT_ARTIST_NAME)); iStationName = qobject_cast<HbLabel *> (iLoader.findObject(NOW_PLAYING_VIEW_OBJECT_STATION_NAME)); iStationLogo->setIcon(HbIcon(KDefaultStationLogo)); iStationName->setPlainText(""); updateSongName(QString("")); iArtistName->setPlainText(""); connect(iSongNameLabel, SIGNAL(geometryChanged()), this, SLOT(handleGeometryChanged())); iArtistName->setTextColor(HbColorScheme::color(KArtistColor)); iSongNameLabel->setTextColor(HbColorScheme::color(KSongColor)); iSongNameMarquee->setTextColor(HbColorScheme::color(KSongColor)); iStationName->setTextColor(HbColorScheme::color(KStationColor)); #ifdef ADV_ENABLED iAdvImage = qobject_cast<HbLabel *> (iLoader.findObject( NOW_PLAYING_VIEW_OBJECT_ADVERTISEMENT_IMAGE)); iAdvImage->setIcon(HbIcon(KDefaultStationLogo)); #endif }
void WindowStateStorage::setGeometry(const QVariantMap& geometry) { if (geometry != m_geometry) { m_geometry = geometry; Q_EMIT geometryChanged(m_geometry); } }
CountrySelect::CountrySelect() : QWidget(App::wnd()), _result("none"), _filter(this, st::inpCountry, lang(lng_country_ph)), _scroll(this, st::scrollCountries), _list(&_scroll), _doneButton(this, lang(lng_country_done), st::btnSelectDone), _cancelButton(this, lang(lng_cancel), st::btnSelectCancel), _innerLeft(0), _innerTop(0), _innerWidth(0), _innerHeight(0), a_alpha(0), a_bgAlpha(0), a_coord(st::countriesSlideShift), _shadow(st::boxShadow) { setGeometry(App::wnd()->rect()); App::wnd()->topWidget(this); connect(App::wnd(), SIGNAL(resized(const QSize &)), this, SLOT(onParentResize(const QSize &))); connect(&_doneButton, SIGNAL(clicked()), this, SLOT(onCountryChoose())); connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onCountryCancel())); connect(&_scroll, SIGNAL(scrollFinished()), this, SLOT(onScrollFinished())); connect(&_scroll, SIGNAL(geometryChanged()), &_list, SLOT(onParentGeometryChanged())); connect(&_scroll, SIGNAL(scrolled()), &_list, SLOT(onUpdateSelected())); connect(&_list, SIGNAL(countrySelected()), this, SLOT(onCountryChoose())); connect(&_filter, SIGNAL(changed()), this, SLOT(onFilterUpdate())); connect(&_list, SIGNAL(mustScrollTo(int, int)), &_scroll, SLOT(scrollToY(int, int))); show(); setFocus(); _scroll.setWidget(&_list); _scroll.setFocusPolicy(Qt::NoFocus); prepareAnimation(0); }
void Context::AppletToolbarAppletItem::resizeEvent( QGraphicsSceneResizeEvent *event ) { Q_UNUSED( event ) QFontMetrics fm( m_label->font() ); if( m_configEnabled ) { m_deleteIcon->setPos( ( boundingRect().width() - (m_deleteIcon->boundingRect().width() ) ) - 1, -1 ); if( fm.width( m_applet->name() ) + m_deleteIcon->boundingRect().width() > boundingRect().width() ) m_label->setPlainText( fm.elidedText( m_applet->name(), Qt::ElideRight, boundingRect().width() - m_deleteIcon->boundingRect().width() ) ); else m_label->setPlainText( m_applet->name() ); m_label->setPos( ( ( boundingRect().width() - m_deleteIcon->boundingRect().width() ) - m_label->boundingRect().width() ) / 2, ( boundingRect().height() - m_label->boundingRect().height() ) / 2 ); } else { if( fm.width( m_applet->name() ) > boundingRect().width() ) m_label->setPlainText( fm.elidedText( m_applet->name(), Qt::ElideRight, boundingRect().width() ) ); else m_label->setPlainText( m_applet->name() ); m_label->setPos( ( boundingRect().width() - m_label->boundingRect().width() ) / 2, ( boundingRect().height() - m_label->boundingRect().height() ) / 2 ); } emit geometryChanged(); }
void Highlighter::highlightCells() { assert(m_renderer && m_selection.visualization && !m_selection.indices.empty()); auto dataSet = m_selection.visualization->colorMappingInputData(m_selection.visOutputPort); if (!dataSet) { return; } const auto index = m_selection.indices.front(); // extract picked triangle and create highlighting geometry // create two shifted polygons to work around occlusion auto selection = dataSet->GetCell(index); // this is probably a glyph or the like; we don't have an implementation for that in the moment if (!selection || selection->GetCellType() == VTK_VOXEL) { return; } m_impl->highlightCell(*selection); emit geometryChanged(); }
void QDeclarativeWebView::init() { d = new QDeclarativeWebViewPrivate(this); if (QWebSettings::iconDatabasePath().isNull() && QWebSettings::globalSettings()->localStoragePath().isNull() && QWebSettings::offlineStoragePath().isNull() && QWebSettings::offlineWebApplicationCachePath().isNull()) QWebSettings::enablePersistentStorage(); setAcceptedMouseButtons(Qt::LeftButton); setFlag(QGraphicsItem::ItemHasNoContents, true); setFlag(QGraphicsItem::ItemIsFocusScope, true); setClip(true); d->view = new GraphicsWebView(this); d->view->setResizesToContents(true); d->view->setFocus(); QWebPage* wp = new QDeclarativeWebPage(this); setPage(wp); if (!preferredWidth()) setPreferredWidth(d->view->preferredWidth()); if (!preferredHeight()) setPreferredHeight(d->view->preferredHeight()); connect(d->view, SIGNAL(geometryChanged()), this, SLOT(updateDeclarativeWebViewSize())); connect(d->view, SIGNAL(doubleClick(int,int)), this, SIGNAL(doubleClick(int,int))); connect(d->view, SIGNAL(scaleChanged()), this, SIGNAL(contentsScaleChanged())); }
void Highlighter::updateHighlight() { if (!m_renderer) { clear(); return; } if (!m_selection.visualization || m_selection.indices.empty()) { clearIndices(); emit geometryChanged(); return; } switch (m_selection.indexType) { case IndexType::points: highlightPoints(); break; case IndexType::cells: highlightCells(); break; case IndexType::invalid: default: return; } if (m_flashAfterSetTarget) { flashTargets(); } }
void Point::apply_rw(CoordinateSequenceFilter& filter) { if (isEmpty()) return; filter.filter_rw(*coordinates, 0); if (filter.isGeometryChanged()) geometryChanged(); }
void HgCenterItemArea::resizeEvent(QGraphicsSceneResizeEvent *event) { FUNC_LOG; INFO("HgCenterItemArea: size:" << size() << event->newSize()); HbWidget::resizeEvent(event); emit geometryChanged(); }
void NoGUI::setGeometry(Geometry *geometry) { if (m_geometry == geometry) return; m_geometry = geometry; emit geometryChanged(geometry); }
void WindowScriptingInterface::onWindowGeometryChanged(const QRect& windowGeometry) { auto geometry = windowGeometry; auto menu = qApp->getPrimaryMenu(); if (menu) { geometry.setY(geometry.y() + menu->geometry().height()); } emit geometryChanged(geometry); }
void ScrollArea::resizeEvent(QResizeEvent *e) { QScrollArea::resizeEvent(e); hor.recountSize(); vert.recountSize(); topSh.setGeometry(QRect(0, 0, width(), qAbs(_st.topsh))); bottomSh.setGeometry(QRect(0, height() - qAbs(_st.bottomsh), width(), qAbs(_st.bottomsh))); emit geometryChanged(); }
void Outline::setGeometry(const QRect& outlineGeometry) { if (m_outlineGeometry == outlineGeometry) { return; } m_outlineGeometry = outlineGeometry; emit geometryChanged(); }
void Settings::setGeometry(const QByteArray &geometry) { if (geometry_ == geometry) return; geometry_ = geometry; settings_.setValue(geometryKey, geometry); emit geometryChanged(geometry); }
void VCWidget::setGeometry(QRect rect) { if (m_geometry == rect) return; m_geometry = rect; setDocModified(); emit geometryChanged(rect); }
void WIDGET::setGeometry(QRect const &r) { if (dim == r) { return; // Nothing to do. } dim = r; geometryChanged(); }
QVariant Context::AppletToolbarAppletItem::itemChange( GraphicsItemChange change, const QVariant &value ) { QVariant ret = QGraphicsWidget::itemChange( change, value ); if( change == ItemPositionHasChanged ) emit geometryChanged(); return ret; }
void QxtScheduleInternalItem::setGeometry(const QVector< QRect > geo) { if (!this->parent()) return; QVector<QRect> oldGeo = this->m_geometries; this->m_geometries.clear(); this->m_geometries = geo; emit geometryChanged(this, oldGeo); }
Context::AppletItemOverlay::AppletItemOverlay( Context::AppletToolbarAppletItem *applet, QGraphicsLinearLayout* layout, QWidget *parent ) : QWidget( parent ), m_applet( applet ), m_spacer(0), m_layout( layout ), m_deleteIcon( 0 ), m_index( 0 ), m_clickDrag( false ) { DEBUG_BLOCK if( layout ) { m_layout = layout; int i = 0; for(; i < m_layout->count(); ++i) { QGraphicsWidget *w = dynamic_cast< QGraphicsWidget* >( m_layout->itemAt( i ) ); if( w == m_applet ) { m_index = i; break; } } } else debug() << "GOT APPLET WITH NO LAYOUT! BAD!"; m_deleteIcon = new QToolButton( this ); QAction* delApplet = new QAction( i18n( "Remove Applet" ), this ); delApplet->setIcon( KIcon( "edit-delete" ) ); delApplet->setVisible( true ); delApplet->setEnabled( true ); m_deleteIcon->addAction( delApplet ); m_deleteIcon->setIcon( KIcon( "edit-delete" ) ); m_deleteIcon->setMaximumSize( 24, 24 ); QColor trans; trans.setAlpha( 0 ); QBrush brush( Qt::transparent ); QPalette pal = m_deleteIcon->palette(); pal.setBrush( QPalette::Window, brush ); // m_deleteIcon->setBackgroundRole( QPalette::Base ); m_deleteIcon->setPalette( pal ); m_deleteIcon->setAutoFillBackground( false ); m_deleteIcon->setAttribute( Qt::WA_NoSystemBackground ); //m_deleteIcon->setAttribute( Qt::WA_TranslucentBackground ); //NB: Introduced in Qt 4.5 connect( delApplet, SIGNAL( triggered() ), this, SLOT( deleteApplet() ) ); connect( m_deleteIcon, SIGNAL( released() ), this, SLOT( deleteApplet() ) ); syncGeometry(); connect( m_applet, SIGNAL( destroyed(QObject*) ), this, SLOT( deleteLater() ) ); connect( m_applet, SIGNAL( geometryChanged() ), this, SLOT( delaySyncGeometry() ) ); }
void ScreenInfo::setScreen(int screen) { if (m_screen != screen) { m_screen = screen; Q_EMIT screenChanged(m_screen); Q_EMIT geometryChanged(geometry()); Q_EMIT availableGeometryChanged(availableGeometry()); Q_EMIT panelsFreeGeometryChanged(panelsFreeGeometry()); } }
NetPanelController::NetPanelController(QWidget *parent, NetView *view, Plasma::Containment *containment) : Plasma::Dialog(parent), m_containment(containment), m_view(view), m_watched(0) { hide(); m_mainWidget = new QGraphicsWidget(containment); if (containment && containment->corona()) { containment->corona()->addOffscreenWidget(m_mainWidget); } m_layout = new QGraphicsLinearLayout(Qt::Horizontal, m_mainWidget); m_iconSvg = new Plasma::Svg(this); m_iconSvg->setImagePath("widgets/configuration-icons"); m_iconSvg->setContainsMultipleImages(true); m_iconSvg->resize(KIconLoader::SizeSmall, KIconLoader::SizeSmall); m_moveButton = new Plasma::ToolButton(m_mainWidget); m_moveButton->nativeWidget()->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); m_moveButton->setIcon(m_iconSvg->pixmap("move")); m_moveButton->setText(i18n("Screen edge")); m_moveButton->setCursor(Qt::SizeAllCursor); m_layout->addItem(m_moveButton); m_resizeButton = new Plasma::ToolButton(m_mainWidget); m_resizeButton->nativeWidget()->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); m_resizeButton->setIcon(m_iconSvg->pixmap("size-vertical")); m_resizeButton->setText(i18n("Height")); m_layout->addItem(m_resizeButton); m_autoHideButton = new Plasma::ToolButton(m_mainWidget); m_autoHideButton->nativeWidget()->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); m_autoHideButton->nativeWidget()->setCheckable(true); m_autoHideButton->setIcon(m_iconSvg->pixmap("collapse")); m_autoHideButton->setText(i18n("Auto Hide")); m_layout->addItem(m_autoHideButton); m_autoHideButton->nativeWidget()->setChecked(view->autoHide()); connect(m_autoHideButton->nativeWidget(), SIGNAL(toggled(bool)), view, SLOT(setAutoHide(bool))); connect(containment, SIGNAL(geometryChanged()), this, SLOT(updatePosition())); m_moveButton->installEventFilter(this); m_resizeButton->installEventFilter(this); setGraphicsWidget(m_mainWidget); layout()->activate(); m_layout->activate(); m_mainWidget->resize(m_mainWidget->effectiveSizeHint(Qt::PreferredSize)); updatePosition(); show(); Plasma::WindowEffects::slideWindow(this, containment->location()); KWindowSystem::setState(winId(), NET::KeepAbove|NET::StaysOnTop); }