Exemple #1
0
void BaseForm::bindBuffer(qint32 id, QLineEdit* e, QToolButton* s, QComboBox* d)
{
    s->setProperty(PROP_EDIT, qVariantFromValue((void*)e));
    s->setProperty(PROP_DIRT, qVariantFromValue((void*)d));

    connect(s, SIGNAL(released()), this, SLOT(send()));

    bindClick(s, Qt::Key_0 + id + Qt::CTRL);
    bindFocus(e, Qt::Key_0 + id + Qt::ALT);
    bindFocus(d, Qt::Key_0 + id + Qt::CTRL + Qt::SHIFT);
}
Exemple #2
0
bool ServerForm::initHotkeys()
{
	bindFocus(m_ui.cmbTcpAddr, Qt::Key_Escape);
	bindClick(m_ui.btnTcp,  Qt::CTRL + Qt::Key_T);
	bindClick(m_ui.btnUdp,  Qt::CTRL + Qt::Key_U);

	return true;
}
Exemple #3
0
bool TransferForm::initHotkeys()
{
	bindFocus(m_ui.cmbSrcAddr, Qt::Key_Escape);
	bindClick(m_ui.btnTrigger,  Qt::CTRL + Qt::Key_S);
	bindSelect(m_ui.cmbType, 0, Qt::CTRL + Qt::Key_T);
	bindSelect(m_ui.cmbType, 1, Qt::CTRL + Qt::Key_U);

	return true;
}
Exemple #4
0
void BaseForm::initLister(QToolButton* a, QToolButton* k, QListWidget* l)
{
    m_cnlist = l;

    QShortcut* sk = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_K), this);
    QShortcut* sa = new QShortcut(QKeySequence(Qt::ALT  + Qt::Key_A), this);

    connect(sk, SIGNAL(activated()), this, SLOT(kill()));
    connect(sa, SIGNAL(activated()), m_cnlist, SLOT(selectAll()));

    connect(k, SIGNAL(released()), this, SLOT(kill()));
    connect(a, SIGNAL(released()), m_cnlist, SLOT(selectAll()));

    bindFocus(m_cnlist, Qt::Key_F2);
}
Exemple #5
0
void BaseForm::initLogger(QCheckBox* w, QToolButton* c, QTreeWidget* o, QPlainTextEdit* d)
{
    m_logger.init(o, w, d);

    connect(c, SIGNAL(released()), this, SLOT(clear()));
    connect(&m_logger, SIGNAL(clearLog()), this, SLOT(clear()));

    bindFocus(o, Qt::Key_F3);

    QShortcut* wr = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
    QShortcut* cl = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_D), this);
    QShortcut* sl = new QShortcut(QKeySequence(Qt::Key_F4), this);

    sl->setProperty(PROP_TARG, qVariantFromValue((void*)d));

    connect(wr, SIGNAL(activated()), w, SLOT(click()));
    connect(sl, SIGNAL(activated()), this, SLOT(hotOutput()));
    connect(cl, SIGNAL(activated()), this, SLOT(clear()));

    connect(this, SIGNAL(output(const QString&)), &m_logger, SLOT(output(const QString&)));
    connect(this, SIGNAL(output(const QString&, const char*, quint32)), &m_logger, SLOT(output(const QString&, const char*, quint32)));
}