Пример #1
0
void FindPlugin::openFindFilter()
{
    QAction *action = qobject_cast<QAction*>(sender());
    QTC_ASSERT(action, return);
    IFindFilter *filter = action->data().value<IFindFilter *>();
    openFindDialog(filter);
}
Пример #2
0
void MainWindow::initConnects()
{
    connect(ui->newFileAct, SIGNAL(triggered()), this, SLOT(newFileSlot()));
    connect(ui->openFileAct, SIGNAL(triggered()), this, SLOT(openFileSlot()));
    connect(ui->saveAct, SIGNAL(triggered()), this, SLOT(saveSlot()));
    connect(ui->saveasAct, SIGNAL(triggered()), this, SLOT(saveAsSlot()));
    connect(ui->exitAct, SIGNAL(triggered()), this, SLOT(close()));

    connect(ui->undoAct, SIGNAL(triggered()), ui->textEdit, SLOT(undo()));
    connect(ui->cutAct, SIGNAL(triggered()), ui->textEdit, SLOT(cut()));
    connect(ui->copyAct, SIGNAL(triggered()), ui->textEdit, SLOT(copy()));
    connect(ui->pasteAct, SIGNAL(triggered()), ui->textEdit, SLOT(paste()));

    connect(ui->fontAct, SIGNAL(triggered()), this, SLOT(selectFontSlot()));

    connect(ui->statuBarAct, SIGNAL(triggered()), this, SLOT(changStatuBarSlot()));

    connect(ui->aboutAct, SIGNAL(triggered()), this, SLOT(openAboutSlot()));
    connect(ui->aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
    connect(ui->findAct, SIGNAL(triggered()), this, SLOT(openFindDialog()));
    connect(ui->dateAct, SIGNAL(triggered()), this, SLOT(newDateSlot()));
}