Beispiel #1
0
void AccelEditor::OnTimer(UINT_PTR nIDEvent)
{
	if (nIDEvent == 1)
	{
		m_timer += 50;
		if (m_timer >= m_timeoutValue)
		{
			m_progress.SetPos(m_timeoutValue);
			m_progress.SetBarColor(RGB(255, 255, 0));
			if (m_autoMode == AUTO_NEW)
			{
				OnAssign();
			}
			else
			{
				OnReplace();
			}
			if (m_currents.IsWindowEnabled())
				m_currents.SetFocus();
			else
				m_commands.SetFocus();
			return;
		}
		UINT green = (m_timer * 255 / m_timeoutValue);
		m_progress.SetBarColor(RGB(128 + green / 2, green, 255 - green));
		m_progress.SetPos(m_timer);
	}
}
CSelectIconDlg::CSelectIconDlg(IDatabase* database,int CurrentId,QWidget* parent, Qt::WFlags fl):QDialog(parent,fl){
	setupUi(this);
	db=database;
	Id=CurrentId;
	CtxMenu=new QMenu(this);
	ReplaceAction=CtxMenu->addAction(getIcon("swap"),tr("Replace..."));
	DeleteAction=CtxMenu->addAction(getIcon("delete"),tr("Delete"));
	QPushButton* Button_AddIcon = ButtonBox->addButton(tr("Add Custom Icon"), QDialogButtonBox::ActionRole);
	Button_PickIcon = ButtonBox->addButton(tr("Pick"), QDialogButtonBox::AcceptRole);
	connect(Button_AddIcon, SIGNAL(clicked()), this, SLOT(OnAddIcon()));
	connect(Button_PickIcon, SIGNAL(clicked()), this, SLOT(OnPickIcon()));
	connect(ButtonBox, SIGNAL(rejected()), this, SLOT(OnCancel()));
	connect(DeleteAction,SIGNAL(triggered()),this,SLOT(OnDelete()));
	connect(ReplaceAction,SIGNAL(triggered()),this,SLOT(OnReplace()));
	connect(List,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),this,SLOT(OnSelectionChanged(QListWidgetItem*)));
}
void QuickFindBar::OnButtonReplace(wxCommandEvent& e) { OnReplace(e); }
Beispiel #4
0
void QuickFindBar::OnButtonReplace(wxFlatButtonEvent& e)
{
    OnReplace(e);
}