Exemplo n.º 1
0
void KviActionManager::customizeToolBarsDialogDestroyed()
{
	m_bCustomizingToolBars = false;
	emit endCustomizeToolBars();
	if(m_pCurrentToolBar)
	{
		m_pCurrentToolBar->update();
		m_pCurrentToolBar = nullptr;
	}
	g_pApp->saveToolBars();
}
Exemplo n.º 2
0
KviCustomToolBar::KviCustomToolBar(KviCustomToolBarDescriptor * pDesc, const QString & szLabel, Qt::ToolBarArea type, const char * pcName)
: KviToolBar(szLabel,type,pcName)
{
	m_pDescriptor = pDesc;
	m_pFilteredChildren = 0;
	setAcceptDrops(true);
	// if the user removes all the items from this toolbar, keep a minimum size to permit dropping new item
	setMinimumSize(16,16);

	connect(KviActionManager::instance(),SIGNAL(beginCustomizeToolBars()),this,SLOT(beginCustomize()));
	connect(KviActionManager::instance(),SIGNAL(endCustomizeToolBars()),this,SLOT(endCustomize()));

	pDesc->registerToolBar(this);
	if(KviActionManager::customizingToolBars())
		beginCustomize(); // because we will not get the signal
}