Exemple #1
0
IconPalette::IconPalette(QWidget * parent)
	: QWidget(parent, Qt::Popup), tornoff_(false)
{
	QVBoxLayout * v = new QVBoxLayout(this);
	v->setMargin(0);
	v->setSpacing(0);
	layout_ = new QGridLayout;
	layout_->setSpacing(0);
	const int fw = style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this);
	layout_->setMargin(fw);
	tearoffwidget_ = new TearOff(this);
	connect(tearoffwidget_, SIGNAL(tearOff()), this, SLOT(tearOff()));
	v->addWidget(tearoffwidget_);
	v->addLayout(layout_);
}
Exemple #2
0
void Arguments::didTearOffActivation(ExecState* exec, JSActivation* activation)
{
    RELEASE_ASSERT(activation);
    if (isTornOff())
        return;

    if (!m_numArguments)
        return;
    
    m_activation.set(exec->vm(), this, activation);
    tearOff(exec);
}