コード例 #1
0
ImageDisplayWidget::ImageDisplayWidget(QWidget *parent) : QWidget(parent),
    layout(new QGridLayout),scrollArea(new QScrollArea),
    imageDisplayLabel(new QLabel)
{
    connect(this, SIGNAL(pathChanged(QString)),this, SLOT(updateDisplayImage(QString)));
    connect(this, SIGNAL(imageChanged(QImage)),this, SLOT(updateDisplayArea(QImage)));
    setupDisplayArea();
}
コード例 #2
0
void VirtualKeyboardGUI::initMode(VirtualKeyboard::Mode *mode) {
	assert(mode->image);

	_kbdSurface = mode->image;
	_kbdTransparentColor = mode->transparentColor;
	_kbdBound.setWidth(_kbdSurface->w);
	_kbdBound.setHeight(_kbdSurface->h);

	setupDisplayArea(mode->displayArea, mode->displayFontColor);

	if (_displaying) {
		extendDirtyRect(_kbdBound);
		redraw();
	}
}