Ejemplo n.º 1
0
void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e)
{
    if (m_mouseDown)
        if (m_selecting)
            emit keySelected(e->y(), true);
        else
            emit keyPressed(e->y(), true); // we're swooshing
    else
        emit hoveredOverKeyChanged(e->y());
}
Ejemplo n.º 2
0
void PercussionPitchRuler::mousePressEvent(QMouseEvent *e)
{
    if (e->button() == Qt::LeftButton) {

        m_mouseDown = true;
        m_selecting = (e->modifiers() & Qt::ShiftModifier);

        if (m_selecting)
            emit keySelected(e->y(), false);
        else
            emit keyPressed(e->y(), false);
    }
}
Ejemplo n.º 3
0
SearchDialog::SearchDialog(QWidget* parent, const char* name)
  : DialogBase(parent, name),
    widget(0)
{
  // ############################################################################
  const char* Descriptions[]= {
    i18n("The title"),
    i18n("The first name"),
    i18n("The additional name"),
    i18n("The name prefix"),
    i18n("The name"),
    i18n("The formatted name"),
    i18n("The address"),
    i18n("The town"),
    i18n("The organization"),
    i18n("The role"),
    i18n("The org unit"),
    i18n("The org subunit"),
    i18n("The email address"),
    i18n("The second email address"),
    i18n("The third email address"),
    i18n("The telephone number"),
    i18n("The fax number"),
    i18n("The modem number"),
    i18n("The homepage URL"),
    i18n("The comment") };
  const int Size=sizeof(Descriptions)/sizeof(Descriptions[0]);
  int count;
  // ----- create main widget:
  widget=new SearchDialogMainWidget(this);
  CHECK(widget!=0);
  setMainWidget(widget);
  // ----- configure dialog:
  setCaption(i18n("kab: Search entries"));
  enableButtonApply(false);
  // showMainFrameTile(false);
  // -----
  for(count=0; count<Size; count++)
    {
      widget->comboSelector->insertItem(Descriptions[count]);
    }
  connect(widget->comboSelector, SIGNAL(activated(int)), SLOT(keySelected(int)));
  connect(widget->lePattern, SIGNAL(textChanged(const char*)), 
	  SLOT(valueChanged(const char*)));
  connect(widget, SIGNAL(sizeChanged()), SLOT(initializeGeometry()));
  keySelected(0);
  resize(minimumSize());
  widget->lePattern->setFocus();
  // ############################################################################
}