Пример #1
0
void ZLQtDialogContent::attachWidgets(ZLOptionView &view, QWidget *widget0, int weight0, QWidget *widget1, int weight1) {
	std::map<ZLOptionView*,Position>::const_iterator it = myOptionPositions.find(&view);
	if (it != myOptionPositions.end()) {
		Position position = it->second;
		int secondStart = position.FromColumn + (position.ToColumn - position.FromColumn + 1) * weight0 / (weight0 + weight1);
		attachWidget(widget0, position.Row, position.FromColumn, secondStart - 1);
		attachWidget(widget1, position.Row, secondStart, position.ToColumn);
	}
}	
Пример #2
0
void ZLQtDialogContent::attachWidget(ZLOptionView &view, QWidget *widget) {
	std::map<ZLOptionView*,Position>::const_iterator it = myOptionPositions.find(&view);
	if (it != myOptionPositions.end()) {
		Position position = it->second;
		attachWidget(widget, position.Row, position.FromColumn, position.ToColumn);
	}
}	
Пример #3
0
void
MainWindow::init()
{
	makeUI();
	createActions();
	createConnects();
	setStatusBar(statusBar());
	attachWidget();
}
Пример #4
0
void
MainWindow::makeUI()
{
	setWindowTitle(QApplication::translate("SHOT Display", "SHOT Display", 0, QApplication::UnicodeUTF8));
	setWindowIcon(QIcon(QString::fromUtf8("/usr/local/opi/images/sd_icon.png")));
	centralwidget = new QWidget(this);
	centralwidget->setObjectName (QString::fromUtf8("centralwidget"));
	centralwidget->setWindowTitle(QApplication::translate("KWT test", "Central", 0, QApplication::UnicodeUTF8));

	centralwidget->setGeometry(QRect(0,0,1280,950));
	centralwidget->setMinimumSize(QSize(1280,950));
	centralwidget->setMaximumSize(QSize(1920,1280));

	attachWidget();
	setCentralWidget(centralwidget);


}