Exemplo n.º 1
0
CDialogFindInFiles::CDialogFindInFiles(QWidget *parent) :
    QWidget(parent)
{
    m_labelFiles = new QLabel(STRING_FIND_FROM, this);
    m_comboboxFiles = new CDialogFindCompobox(this);

    m_buttonOpenFolderDialog = new QPushButton("...", this);

    m_labelFileTypes = new QLabel(STRING_FIND_FILE_TYPES, this);
    m_comboboxFileTypes = new CDialogFindCompobox(this);

    connect(m_comboboxFiles, SIGNAL(enterPressed()), parent, SLOT(onSearchClicked()));
    connect(m_comboboxFileTypes, SIGNAL(enterPressed()), parent, SLOT(onSearchClicked()));

    m_comboboxFiles->setEditable(true);
    m_comboboxFileTypes->setEditable(true);

    m_labelFiles->setGeometry(0, 0, DIALOG_FIND_FIRST_COLUMN_WIDTH, m_labelFiles->height() );

    const int iButtonOpenFolderDialogWidth = 20;
    m_comboboxFiles->setGeometry(DIALOG_FIND_FIRST_COLUMN_WIDTH, 0, DIALOG_FIND_SECOND_COLUMN_WIDTH - iButtonOpenFolderDialogWidth - 5, m_comboboxFiles->height() );
    m_buttonOpenFolderDialog->setGeometry(m_comboboxFiles->x()+m_comboboxFiles->width()+5, 0, iButtonOpenFolderDialogWidth, m_comboboxFiles->height() );
    m_labelFileTypes->setGeometry(0, DIALOG_FIND_ROW_HEIGHT, DIALOG_FIND_FIRST_COLUMN_WIDTH, m_labelFileTypes->height() );
    m_comboboxFileTypes->setGeometry(DIALOG_FIND_FIRST_COLUMN_WIDTH, DIALOG_FIND_ROW_HEIGHT, DIALOG_FIND_SECOND_COLUMN_WIDTH, m_comboboxFileTypes->height() );

    connect(m_buttonOpenFolderDialog, SIGNAL(clicked()), this, SLOT(onOpenFolderDialog()));
}
Exemplo n.º 2
0
void OnyxSearchDialog::onItemActivated(CatalogView *catalog,
                                   ContentView *item,
                                   int user_data)
{
    OData * item_data = item->data();
    if (item_data->contains(TAG_MENU_TYPE))
    {
        int menu_type = item->data()->value(TAG_MENU_TYPE).toInt();
        if(OnyxKeyboard::KEYBOARD_MENU_OK == menu_type)
        {
            onSearchClicked();
        }
        else if(OnyxKeyboard::KEYBOARD_MENU_CLEAR == menu_type)
        {
            clearClicked();
            update();
            onyx::screen::watcher().enqueue(this, onyx::screen::ScreenProxy::DW);
        }
        else if (SEARCH_NAV_PREVIOUS == menu_type)
        {
            onSearchPrevClicked();
        }
        else if (SEARCH_NAV_NEXT == menu_type)
        {
            onSearchNextClicked();
        }
    }
}
Exemplo n.º 3
0
SearchWidget::SearchWidget(QWidget *parent)
    : QWidget(parent)
{
    this->initData();
    this->initUI();
    this->initConnect();

    onSearchClicked();
}
Exemplo n.º 4
0
AddContactPanel::AddContactPanel(QWidget *parent)
  : QDialog(parent)
  , ui(new Ui::AddContactPanel)
{
  ui->setupUi(this);

  connect(ui->cancelButton, SIGNAL(clicked()),
          this, SLOT(onCancelClicked()));
  connect(ui->searchButton, SIGNAL(clicked()),
          this, SLOT(onSearchClicked()));
  connect(ui->addButton, SIGNAL(clicked()),
          this, SLOT(onAddClicked()));

  ui->infoView->setColumnCount(3);

  m_typeHeader = new QTableWidgetItem(QString("Type"));
  ui->infoView->setHorizontalHeaderItem(0, m_typeHeader);
  m_valueHeader = new QTableWidgetItem(QString("Value"));
  ui->infoView->setHorizontalHeaderItem(1, m_valueHeader);
  m_endorseHeader = new QTableWidgetItem(QString("Endorse"));
  ui->infoView->setHorizontalHeaderItem(2, m_endorseHeader);

}
Exemplo n.º 5
0
void SearchWidget::initConnect(){
    connect(searchButton, SIGNAL(clicked()), this, SLOT(onSearchClicked()));
    connect(colorButton, SIGNAL(clicked()), this, SLOT(showColorDialog()));
    connect(changeButton, SIGNAL(clicked()), this, SLOT(changeType()));
}