void SmartWindow::setWindowMode (const WindowMode& mode) { hide(); m_windowMode = mode; /* Enable window borders and resize to minimum size */ if (mode == kNormal) { QDesktopWidget w; int dx = w.width() / 9; int dy = w.height() / 2; move (Settings::get ("x", dx).toInt(), Settings::get ("y", dy).toInt()); resize (minimumSizeHint()); setFixedSize (minimumSizeHint()); setWindowFlags (Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint); } /* Disable window borders */ else if (mode == kDocked) setWindowFlags (Qt::FramelessWindowHint); show(); resizeToFit(); }
SmartWindow::SmartWindow() { m_useFixedSize = true; connect (DS_Timers::getInstance(), SIGNAL (timeout20()), this, SLOT (resizeToFit())); }
void ConnectorComponent::update() { float x1, y1, x2, y2; getPoints (x1, y1, x2, y2); if (lastInputX != x1 || lastInputY != y1 || lastOutputX != x2 || lastOutputY != y2) { resizeToFit(); } }
void update() { float x1, y1, x2, y2; getPoints (x1, y1, x2, y2); if (lastInputX != x1 || lastInputY != y1 || lastOutputX != x2 || lastOutputY != y2) { resizeToFit(); } }
void ConnectorComponent::dragEnd (int x, int y) { lastOutputX = (float) x; lastOutputY = (float) y; resizeToFit(); }
void ConnectorComponent::dragStart (int x, int y) { lastInputX = (float) x; lastInputY = (float) y; resizeToFit(); }
void dragEnd (int x, int y) { lastOutputX = (float) x; lastOutputY = (float) y; resizeToFit(); }
void dragStart (int x, int y) { lastInputX = (float) x; lastInputY = (float) y; resizeToFit(); }