Пример #1
0
AMDataViewWithActionButtons::AMDataViewWithActionButtons(AMDatabase* database, QWidget *parent) :
	QWidget(parent)
{
	QVBoxLayout* vl = new QVBoxLayout;
	dataView_ = new AMDataView(database);

	QFrame* actionsBarFrame = new QFrame;
	ui_ = new Ui::AMDataViewActionsBar;
	ui_->setupUi(actionsBarFrame);

	vl->setContentsMargins(0,0,0,0);
	vl->setSpacing(0);

	vl->addWidget(dataView_);
	vl->addWidget(actionsBarFrame);
	setLayout(vl);

	connect(ui_->sizeSlider, SIGNAL(valueChanged(int)), dataView_, SLOT(setItemSize(int)));
	connect(ui_->expandAllButton, SIGNAL(clicked()), dataView_, SLOT(expandAll()));
	connect(ui_->collapseAllButton, SIGNAL(clicked()), dataView_, SLOT(collapseAll()));

	connect(ui_->openSameEditorButton, SIGNAL(clicked()), this, SLOT(onCompareScansAction()));
	connect(ui_->openSeparateEditorButton, SIGNAL(clicked()), this, SLOT(onEditScansAction()));
	connect(ui_->exportButton, SIGNAL(clicked()), this, SLOT(onExportScansAction()));
	connect(ui_->scanConfigurationButton, SIGNAL(clicked()), this, SLOT(onLaunchScanConfigurationsFromDb()));

	connect(dataView_, SIGNAL(viewDoubleClicked()), this, SLOT(onDoubleClick()));
	connect(dataView_, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
	connect(dataView_, SIGNAL(editScansFromDb()), this, SLOT(onEditScansAction()));
	connect(dataView_, SIGNAL(compareScansFromDb()), this, SLOT(onCompareScansAction()));
	connect(dataView_, SIGNAL(exportScansFromDb()), this, SLOT(onExportScansAction()));
	connect(dataView_, SIGNAL(launchScanConfigurationsFromDb()), this, SLOT(onLaunchScanConfigurationsFromDb()));
	connect(dataView_, SIGNAL(fixCDF()), this, SLOT(onFixCDF()));
}
Пример #2
0
// Executed on doubleclick of the TokenPool, emits signal onDoubleClick( QString )
// that connects to TokenLayoutWidget::addToken( QString )
void
TokenPool::mouseDoubleClickEvent( QMouseEvent *event )
{
    QListWidgetItem *tokenItem = itemAt( event->pos() );
    if( tokenItem )
        emit onDoubleClick( m_itemTokenMap.value( tokenItem ) ); //token->name() << token->iconName() << token->value()
}
Пример #3
0
bool UIWidget::onMousePress(const Point& mousePos, Fw::MouseButton button)
{
    if(button == Fw::MouseLeftButton) {
        if(m_clickTimer.running() && m_clickTimer.ticksElapsed() <= 200) {
            if(onDoubleClick(mousePos))
                return true;
            m_clickTimer.stop();
        } else
            m_clickTimer.restart();
        m_lastClickPosition = mousePos;
    }

    return callLuaField<bool>("onMousePress", mousePos, button);
}
void ColorPaletteSwatchArea::mouseDoubleClickEvent(QMouseEvent *event)
{
	assert(event);

	if (event->button() != Qt::LeftButton)
		return;

	Image *currentImage = ImageArea::getCurrentImage();

	if (!currentImage)
		return;

	emit onDoubleClick();
}
Пример #5
0
IrcChannelListForm::IrcChannelListForm(IrcAccount *account,QWidget *parent) :
	QWidget(parent),
	ui(new Ui::IrcChannelListForm),
	m_account(account),
	m_model(new ChannelsModel(this))
{
	ui->setupUi(this);
	connect(ui->startButton, SIGNAL(clicked()), SLOT(onStartSearch()));
	connect(ui->filterEdit, SIGNAL(returnPressed()), SLOT(onStartSearch()));
	connect(ui->channelsView, SIGNAL(doubleClicked(QModelIndex)), SLOT(onDoubleClick(QModelIndex)));
	ui->startButton->setIcon(Icon("media-playback-start"));
	ui->channelsView->setModel(m_model);
	ui->channelsView->setItemDelegate(new ChannelsDelegate(this));
}
	bool GUIButtonBase::_mouseEvent(const GUIMouseEvent& ev)
	{
		if(ev.getType() == GUIMouseEventType::MouseOver)
		{
			if (!_isDisabled())
			{
				_setState(_isOn() ? GUIElementState::HoverOn : GUIElementState::Hover);
				onHover();
			}

			return mBlockPointerEvents;
		}
		else if(ev.getType() == GUIMouseEventType::MouseOut)
		{
			if (!_isDisabled())
			{
				_setState(_isOn() ? GUIElementState::NormalOn : GUIElementState::Normal);
				onOut();
			}

			return mBlockPointerEvents;
		}
		else if(ev.getType() == GUIMouseEventType::MouseDown)
		{
			if (!_isDisabled())
				_setState(_isOn() ? GUIElementState::ActiveOn : GUIElementState::Active);

			return mBlockPointerEvents;
		}
		else if(ev.getType() == GUIMouseEventType::MouseUp)
		{
			if (!_isDisabled())
			{
				_setState(_isOn() ? GUIElementState::HoverOn : GUIElementState::Hover);
				onClick();
			}

			return mBlockPointerEvents;
		}
		else if (ev.getType() == GUIMouseEventType::MouseDoubleClick)
		{
			if (!_isDisabled())
				onDoubleClick();

			return mBlockPointerEvents;
		}

		return false;
	}
Пример #7
0
void AllegroList::doubleClick(int num)
{
    // The selection should already be set from the first click
    if(onDoubleClick)
        onDoubleClick(num);
}