//BEGIN class BGMonitorArrangement BGMonitorArrangement::BGMonitorArrangement(QWidget *parent, const char *name) : QWidget(parent, name) { m_pBGMonitor.resize( QApplication::desktop()->numScreens(), 0l ); for (int screen = 0; screen < QApplication::desktop()->numScreens(); ++screen) { BGMonitorLabel * label = new BGMonitorLabel(this); m_pBGMonitor[screen] = label; connect( label->monitor(), SIGNAL(imageDropped(const QString &)), this, SIGNAL(imageDropped(const QString &)) ); } parent->setFixedSize(200, 186); setFixedSize(200, 186); updateArrangement(); }
//BEGIN class BGMonitorArrangement BGMonitorArrangement::BGMonitorArrangement(QWidget *parent) : QWidget(parent) { m_pBGMonitor.resize(QApplication::desktop()->numScreens()); int numScreens = QApplication::desktop()->numScreens(); for (int screen = 0; screen < numScreens; ++screen) { ScreenPreviewWidget *previewWidget = new ScreenPreviewWidget(this); m_pBGMonitor[screen] = previewWidget; previewWidget->setWhatsThis(i18n("This picture of a monitor contains a preview of what the current settings will look like on your desktop.")); connect(previewWidget, SIGNAL(imageDropped(QString)), this, SIGNAL(imageDropped(QString))); previewWidget->setFixedSize(180, 180); } parent->setFixedSize(210 * numScreens, 200); setFixedSize(210 * numScreens, 200); updateArrangement(); }
void BGMonitorArrangement::resizeEvent(QResizeEvent *e) { QWidget::resizeEvent(e); updateArrangement(); }