Example #1
0
void RoaMainWidget::slot_languageChanged()
{
    // Retranslate gui
    ui->retranslateUi(this);

    components-> retranslate();
    install->retranslate();

    // Set text again for translation
    changeContent(0);
}
Example #2
0
void RoaMainWidget::on_qpNext_clicked()
{
    hideContent(currentIndex);
    currentIndex++;
    changeContent(currentIndex);

    // Start installation
    if(currentIndex == 4)
    {
        emit readyToInstall();
    }
}
Example #3
0
RoaMainWidget::RoaMainWidget(QString _path, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::RoaMainWidget)
{
    // Set transparent
    this->setWindowFlags(Qt::FramelessWindowHint);
    this->setAttribute(Qt::WA_TranslucentBackground, true);

    // Setup the form
    ui->setupUi(this);

    // Translator
    translator = new QTranslator();

    // Add all pages
    welcome = new ROAPageWelcome(this);
    welcome->hide();

    // Connect language change signal
    connect(welcome,SIGNAL(signal_languageChanged()),this,SLOT(slot_languageChanged()));

    license = new ROAPageLicense(this);
    license->hide();

    components = new ROAPageComponents(this);
    components->hide();

    install = new ROAPageInstall(this, _path);
    install->hide();

    status = new ROAPageStatus(this);
    status->hide();

    finish = new ROAPageFinish(this);
    finish->hide();

    // Center the whole window
    QRect desktopRect = QApplication::desktop()->availableGeometry(this);
    QPoint center = desktopRect.center();

    this->move(center.x()-this->width()*0.5,  center.y()-this->height()*0.5);

    currentIndex = 0;

    changeContent(currentIndex);
}
Example #4
0
void SCgView::createActions()
{
    QAction* sep = new QAction(this);
    sep->setSeparator(true);
    mActionsList.append(sep);

    mActionChangeContent = new QAction(mWindow->findIcon("edit-content-change.png"),tr("Set content"),mWindow);
    mActionChangeContent->setShortcut(QKeySequence( tr("C") ));
    connect(mActionChangeContent, SIGNAL(triggered()), this, SLOT(changeContent()));

    mActionShowContent = new QAction(tr("Show content"),mWindow);
    mActionShowContent->setCheckable(true);
    mActionShowContent->setShortcut(QKeySequence( tr("H") ));
    connect(mActionShowContent, SIGNAL(triggered(bool)), this, SLOT(setContentVisible(bool)));

    mActionShowAllContent = new QAction(tr("Show all content"), mWindow);
    connect(mActionShowAllContent, SIGNAL(triggered(bool)), this, SLOT(setContentVisible(bool)));

    mActionHideAllContent = new QAction(tr("Hide all content"), mWindow);
    connect(mActionHideAllContent, SIGNAL(triggered(bool)), this, SLOT(setContentVisible(bool)));

    mActionDeleteContent = new QAction(mWindow->findIcon("edit-content-delete.png"), tr("Delete content"), mWindow);
    mActionDeleteContent->setShortcut(QKeySequence( tr("D") ));
    connect(mActionDeleteContent, SIGNAL(triggered()), this, SLOT(deleteContent()));

    mActionChangeIdtf = new QAction(mWindow->findIcon("edit-change-idtf.png"), tr("Change identifier"), mWindow);
    mActionChangeIdtf->setShortcut(QKeySequence( tr("I") ));
    connect(mActionChangeIdtf, SIGNAL(triggered()), this, SLOT(changeIdentifier()));

    mActionDelete = new QAction(QIcon::fromTheme("edit-delete", mWindow->findIcon("edit-delete.png")), tr("Delete"), mWindow);
    mActionDelete->setShortcut(QKeySequence::Delete);
    connect(mActionDelete, SIGNAL(triggered()), this, SLOT(deleteSelected()));

    mActionContourDelete = new QAction(mWindow->findIcon("edit-delete.png"), tr("Delete contour"), mWindow);
    mActionContourDelete->setShortcut( QKeySequence(tr("Backspace")) );
    connect(mActionContourDelete, SIGNAL(triggered()), this, SLOT(deleteJustContour()));

    mActionSwapPairOrient = new QAction(mWindow->findIcon("edit-swap-pair.png"), tr("Swap orientation"), mWindow);
    mActionSwapPairOrient->setShortcut( QKeySequence(tr("S")));
    connect(mActionSwapPairOrient, SIGNAL(triggered()), this, SLOT(swapPairOrient()));

    mActionCopy = new QAction(QIcon::fromTheme("edit-copy", mWindow->findIcon("edit-copy.png")), tr("Copy"),this);
    mActionCopy->setShortcut(QKeySequence::Copy);
    connect(mActionCopy, SIGNAL(triggered()), mWindow, SLOT(copy()));

    mActionCut = new QAction(QIcon::fromTheme("edit-cut", mWindow->findIcon("edit-cut.png")), tr("Cut"),this);
    mActionCut->setShortcut(QKeySequence::Cut);
    connect(mActionCut, SIGNAL(triggered()), mWindow, SLOT(cut()));

    mActionPaste = new QAction(QIcon::fromTheme("edit-paste", mWindow->findIcon("edit-paste.png")), tr("Paste"),this);
    mActionPaste->setShortcut(QKeySequence::Paste);
    connect(mActionPaste, SIGNAL(triggered()), mWindow, SLOT(paste()));

    mActionSelectAll = new QAction(QIcon::fromTheme("edit-select-all", mWindow->findIcon("edit-select-all.png")), tr("Select All"),this);
    mActionSelectAll->setShortcut(QKeySequence::SelectAll);
    connect(mActionSelectAll, SIGNAL(triggered()), this, SLOT(selectAllCommand()));


    mActionsList.append(mActionChangeContent);
    mActionsList.append(mActionShowContent);
    mActionsList.append(mActionShowAllContent);
    mActionsList.append(mActionHideAllContent);
    mActionsList.append(mActionDeleteContent);

    sep = new QAction(this);
    sep->setSeparator(true);
    mActionsList.append(sep);

    mActionsList.append(mActionChangeIdtf);
    mActionsList.append(mActionSwapPairOrient);

    sep = new QAction(this);
    sep->setSeparator(true);
    mActionsList.append(sep);

    mActionsList.append(mActionCopy);
    mActionsList.append(mActionCut);
    mActionsList.append(mActionPaste);

    sep = new QAction(this);
    sep->setSeparator(true);
    mActionsList.append(sep);

    mActionsList.append(mActionSelectAll);

    sep = new QAction(this);
    sep->setSeparator(true);
    mActionsList.append(sep);

    mActionsList.append(mActionContourDelete);
    mActionsList.append(mActionDelete);
}
Example #5
0
void RoaMainWidget::on_qpBack_clicked()
{
    hideContent(currentIndex);
    currentIndex--;
    changeContent(currentIndex);
}
Example #6
0
void RoaMainWidget::setCustomContentId(int _id)
{
    hideContent(currentIndex);
    changeContent(_id);
    currentIndex = _id;
}