예제 #1
0
void MaMainWindow::onLeftPaneTabIndexChanged( int newIndex )
{
    int oldIndex = 0 == newIndex ? 1 : 0;
    MaItem* item = curItem(oldIndex);
    if (NULL != item)
        doUiDataExchange(false, item);
    doUiDataExchange(true, curItem());
    if (NULL == curItem())
        clearUi();
    if (0 == newIndex)
	{
		onClearFindInText();
		mItemTreeWidget->setFocus(Qt::OtherFocusReason);
	}
	else if (1 == newIndex)
    {
        mFindItemsLineEdit->setFocus(Qt::OtherFocusReason);
        mFindItemsLineEdit->selectAll();
    }
	mRightPaneTabWidget->setTabEnabled(1, 0 == newIndex);
}
예제 #2
0
void MaMainWindow::onRightPaneTabIndexChanged(int newIndex)
{
	if (1 == newIndex)
	{
		MaItem* item = curItem();
		if (NULL != item)
		{
			if (!item->isParentItem())
				item = item->parentItem();
			QTreeWidgetItem* witem2 = treeWidgetItemToDataItem(item->relPath());
			if (NULL != witem2)
			{
				MaTreeWidget* treeWidget = curTreeWidget();
				treeWidget->setCurrentItem(witem2);
				bool filtered = (mLeftPaneTabWidget->currentIndex() == 1);
				mItemListWidget->clear();
				fillItemTree(qobject_cast<MaParentItem*>(item), NULL, filtered, true, true);
			}
		}
	}
}
예제 #3
0
void MaMainWindow::onOpenItemProtectionDialog()
{
    MaItemProtectionDialog dlg(this);
    dlg.setItem(curItem());
    dlg.exec();
}
예제 #4
0
void MaMainWindow::onShuttingDown()
{
    saveItem(curItem());
}
예제 #5
0
void MaMainWindow::removeItem()
{
    MaTreeWidget* treeWidget = curTreeWidget();
    QTreeWidgetItem* curTreeItem = treeWidget->currentItem();
    removeItem(curItem(), curTreeItem);
}
예제 #6
0
void CHbgModuleList::AddItem(const HbgUpdate_Module& moduleInfo)
{
	++m_newIdx;
	CHbgModuleInfo curItem(m_newIdx, moduleInfo);
	m_modules.push_back(curItem);
}