QtViewController::QtViewController(occ::QtView *qtView)
  : QObject(qtView),
    m_qtView(qtView)
{
  if (qtView != NULL) {
    qtView->installEventFilter(this);
    qtView->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(qtView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showActionMenu(QPoint)));
  }
}
void LLPanelMainInventory::onAddButtonClick()
{
// Gray out the "New Folder" option when the Recent tab is active as new folders will not be displayed
// unless "Always show folders" is checked in the filter options.
	bool recent_active = ("Recent Items" == mActivePanel->getName());
	mMenuAdd->getChild<LLMenuItemGL>("New Folder")->setEnabled(!recent_active);

	setUploadCostIfNeeded();

	showActionMenu(mMenuAdd,"add_btn");
}
void LLPanelMainInventory::onAddButtonClick()
{
	setUploadCostIfNeeded();

	showActionMenu(mMenuAdd,"add_btn");
}
void LLPanelMainInventory::onGearButtonClick()
{
	showActionMenu(mMenuGearDefault,"options_gear_btn");
}