Exemple #1
1
void FMainWindow::swithMaxNormal()
{
    if(isMaximized())
    {
        showNormal();
    }else{
        showMaximized();
    }
}
Exemple #2
0
void KviMdiChild::maximize()
{
	if(isVisible())
	{
		showMaximized();
	} else {
		setWindowState(windowState() & Qt::WindowMaximized & ~Qt::WindowMaximized);
	}
}
Exemple #3
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    mainWizard(NULL)
{
    setWindowTitle(tr("Trajectory Analysis System"));
    showMaximized();

    createMenu();
}
Exemple #4
0
void MainWindow::toggleFullscreen ( )
{
    if(m_to_full->isChecked())
    {
        showFullScreen();
    }else{
        showMaximized();
    }
}
Exemple #5
0
ParserMaker::ParserMaker(QWidget *parent, ParserManager *pd, SiilihaiSettings &s, SiilihaiProtocol &p) :
    QMainWindow(parent), pdb(pd), settings(s), protocol(p), nam(this), engine(this, 0, 0, &nam) {
    ui.setupUi(this);
    loginMatcher = new PatternMatcher(this, true);

    groupListEditor = new GroupListPatternEditor(engine, &parser, &subscription, this);
    ui.tabWidget->addTab(groupListEditor, groupListEditor->tabIcon(), groupListEditor->tabName());
    threadListEditor = new ThreadListPatternEditor(engine, &parser, &subscription, this);
    ui.tabWidget->addTab(threadListEditor, threadListEditor->tabIcon(), threadListEditor->tabName());
    threadListEditor->setEnabled(false);
    messageListEditor = new MessageListPatternEditor(engine, &parser, &subscription, this);
    ui.tabWidget->addTab(messageListEditor, threadListEditor->tabIcon(), messageListEditor->tabName());
    messageListEditor->setEnabled(false);

    connect(groupListEditor, SIGNAL(groupSelected(ForumGroup*)), threadListEditor, SLOT(setGroup(ForumGroup*)));
    connect(threadListEditor, SIGNAL(threadSelected(ForumThread*)), messageListEditor, SLOT(setThread(ForumThread*)));

    connect(&protocol, SIGNAL(saveParserFinished(int, QString)), this, SLOT(saveParserFinished(int, QString)));
    connect(ui.openParserButton, SIGNAL(clicked()), this, SLOT(openClicked()));
    connect(ui.newFromRequestButton, SIGNAL(clicked()), this, SLOT(newFromRequestClicked()));
    connect(ui.saveChangesButton, SIGNAL(clicked()), this, SLOT(saveClicked()));
    connect(ui.saveAsNewButton, SIGNAL(clicked()), this, SLOT(saveAsNewClicked()));
    connect(ui.testForumUrlButton, SIGNAL(clicked()), this, SLOT(testForumUrlClicked()));
    connect(ui.forumUrl, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.parserName, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.parserType, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState()));
    connect(ui.viewThreadPath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.threadListPath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.viewMessagePath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.loginPath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.loginTypeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState()));
    connect(ui.tryLoginButton, SIGNAL(clicked()), this, SLOT(tryLogin()));
    connect(ui.tryWithoutLoginButton, SIGNAL(clicked()), this, SLOT(tryWithoutLogin()));
    connect(ui.verifyLoginPattern, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.helpButton, SIGNAL(clicked()), this, SLOT(helpClicked()));
    connect(&engine, SIGNAL(loginFinished(ForumSubscription *,bool)), this, SLOT(loginFinished(ForumSubscription *, bool)));
    connect(&subscription, SIGNAL(errorsChanged()), this, SLOT(subscriptionErrorsChanged()));

    connect(&engine, SIGNAL(getHttpAuthentication(ForumSubscription *, QAuthenticator *)),
            this, SLOT(getHttpAuthentication(ForumSubscription *, QAuthenticator *)));

    connect(loginMatcher, SIGNAL(dataMatched(int, QString, PatternMatchType)),
            this, SLOT(dataMatched(int, QString, PatternMatchType)));
    connect(loginMatcher, SIGNAL(dataMatchingStart(QString&)), this, SLOT(dataMatchingStart(QString&)));
    connect(loginMatcher, SIGNAL(dataMatchingEnd()), this, SLOT(dataMatchingEnd()));

    subscription.setLatestThreads(100);
    subscription.setLatestMessages(100);
    loginWithoutCredentials = false;

    updateState();
    ui.tabWidget->setCurrentIndex(0);
    if (!restoreGeometry(settings.value("parsermaker_geometry").toByteArray()))
        showMaximized();

    show();
}
void StackedChatWidget::onToggleFullscreen()
{
	if (isFullScreen()) {
		showMaximized();
	} else {
		setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
		showFullScreen();
	}
}
Exemple #7
0
void MainWidget::on_maximizeButton_clicked()
{
    qDebug() << "on_maximizeButton_clicked";
    if (maximizedState) {
        showNormal();
    } else {
        showMaximized();
    }
}
xfWidget::xfWidget( QWidget* parent )
    : QGLWidget( parent )
{
    setGeometry( 150, 100, 1024, 576 );
    scaling = 1.0;
    xrot = yrot = zrot = 0.0f;
    posx = posy = 0.0f;
    showMaximized();
}
Exemple #9
0
void MainWindow::LoadSettings()
{
    // Window/dialog sizes
    if (mSettings->value(SETTINGS_WINDOW_MAXIMIZED, false).toBool())
    {
        showMaximized();
    }
    else
    {
        resize(mSettings->value(SETTINGS_WINDOW_WIDTH, 800).toInt(),
               mSettings->value(SETTINGS_WINDOW_HEIGHT, 600).toInt());
    }

    // Show * states
    mUI.mActionShowStyle->setChecked(mSettings->value(SETTINGS_SHOW_STYLE, true).toBool());
    mUI.mActionShowErrors->setChecked(mSettings->value(SETTINGS_SHOW_ERRORS, true).toBool());
    mUI.mActionShowWarnings->setChecked(mSettings->value(SETTINGS_SHOW_WARNINGS, true).toBool());
    mUI.mActionShowPortability->setChecked(mSettings->value(SETTINGS_SHOW_PORTABILITY, true).toBool());
    mUI.mActionShowPerformance->setChecked(mSettings->value(SETTINGS_SHOW_PERFORMANCE, true).toBool());
    mUI.mActionShowInformation->setChecked(mSettings->value(SETTINGS_SHOW_INFORMATION, true).toBool());

    mUI.mResults->ShowResults(SHOW_ERRORS, mUI.mActionShowErrors->isChecked());
    mUI.mResults->ShowResults(SHOW_STYLE, mUI.mActionShowStyle->isChecked());

    // Main window settings
    const bool showMainToolbar = mSettings->value(SETTINGS_TOOLBARS_MAIN_SHOW, true).toBool();
    mUI.mActionToolBarMain->setChecked(showMainToolbar);
    mUI.mToolBarMain->setVisible(showMainToolbar);

    const bool showViewToolbar = mSettings->value(SETTINGS_TOOLBARS_VIEW_SHOW, true).toBool();
    mUI.mActionToolBarView->setChecked(showViewToolbar);
    mUI.mToolBarView->setVisible(showViewToolbar);

    const bool showFilterToolbar = mSettings->value(SETTINGS_TOOLBARS_FILTER_SHOW, true).toBool();
    mUI.mActionToolBarFilter->setChecked(showFilterToolbar);
    mUI.mToolBarFilter->setVisible(showFilterToolbar);

    SetLanguage(mSettings->value(SETTINGS_LANGUAGE, mTranslation->SuggestLanguage()).toString());

    bool succeeded = mApplications->LoadSettings();
    if (!succeeded)
    {
        QString msg = tr("There was a problem with loading the editor application settings.\n\n"
                         "This is probably because the settings were changed between the Cppcheck versions. "
                         "Please check (and fix) the editor application settings, otherwise the editor "
                         "program might not start correctly.");
        QMessageBox msgBox(QMessageBox::Warning,
                           tr("Cppcheck"),
                           msg,
                           QMessageBox::Ok,
                           this);
        msgBox.exec();

    }

}
Exemple #10
0
CustomWindow::CustomWindow(QWidget *parent) : QWidget(parent), ui(new Ui::CustomWindow)
{
    QFile file(":/CustomWindow.css");
    if (file.open(QFile::ReadOnly))
    {
        setStyleSheet(file.readAll());
        file.close();
    }

    ui->setupUi(this);
    ui->tbMenu->setIcon(QIcon(":/ui/images/app_icon.png"));

    setWindowFlags(Qt::CustomizeWindowHint);
    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_DeleteOnClose);
    setMouseTracking(true);
    ui->titleBar->setMouseTracking(true);
    ui->LTitle->setMouseTracking(true);
    ui->tbMenu->setMouseTracking(true);
    ui->pbMin->setMouseTracking(true);
    ui->pbMax->setMouseTracking(true);
    ui->pbClose->setMouseTracking(true);
    ui->centralWidget->setMouseTracking(true);

    centralLayout = new QHBoxLayout(ui->centralWidget);
    centralLayout->setContentsMargins(9,9,9,9);

    addAction(ui->actionClose);

    connect(ui->pbMin, SIGNAL(clicked()), this, SLOT(minimizeBtnClicked()));
    connect(ui->pbMax, SIGNAL(clicked()), this, SLOT(maximizeBtnClicked()));
    connect(ui->pbClose, SIGNAL(clicked()), this, SLOT(close()));

    //Per poder rebre les dades del ratolí sense haver de clicar cap botó
    m_titleMode = FullTitle;
    moveWidget = false;
    inResizeZone = false;
    allowToResize = false;
    resizeVerSup = false;
    resizeHorEsq = false;
    resizeDiagSupEsq = false;
    resizeDiagSupDer = false;


    QSettings settings("dialogs.ini", QSettings::IniFormat);
    QRect geo = settings.value("geometry").toRect();

    if (geo.height() > 0 and geo.x() < QApplication::desktop()->width() and geo.width() > 0 and geo.y() < QApplication::desktop()->height())
        setGeometry(geo);

    if (settings.value("maximized").toBool())
    {
        showMaximized();
        ui->pbMax->setIcon(QIcon(":/ui/images/app_rest.png"));
    }
}
Exemple #11
0
Editor::Editor(const Logger* lg, ProjectManager* pm, QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::Editor),
    GridVisible(true),
    LogViewerDialog(lg,this),
    LayerViewerDialog(this),
    ChooseExportTypeDialog(0),
    UndoViewerDialog(0),
    ProjectManagerPtr(pm)
{
    ui->setupUi(this);

    connect(this->ui->tabWidget,SIGNAL(requestNewArray(int)),pm,SLOT(createNewArray(int)));
    connect(this->ui->tabWidget,SIGNAL(currentArrayChanged(Array*)),pm,SLOT(setCurrentArray(Array*)));

    connect(pm,SIGNAL(newArrayCreated(int,Array*)),this->ui->tabWidget,SLOT(setNewArray(int,Array*)));
    connect(lg,SIGNAL(totalLogCountChanged(int)),&(this->LogViewerDialog),SLOT(setTotalLogCount(int)));
    connect(this->ui->tabWidget,SIGNAL(layerTreeModelChanged(LayerTreeModel*)),&LayerViewerDialog,SLOT(setLayerTreeModel(LayerTreeModel*)));
    connect(&LayerViewerDialog,SIGNAL(selectionModelChanged(QItemSelectionModel*)),this->ui->tabWidget,SLOT(setLayerSelectionModel(QItemSelectionModel*)));

    //LayerViewerDialog buttons/key stroke signals
    connect(&LayerViewerDialog,SIGNAL(deleteSelectedLayers()),SLOT(on_LayerViewer_deleteLayers()));
    connect(&LayerViewerDialog,SIGNAL(groupSelectedLayers()),SLOT(on_LayerViewer_groupLayers()));
    connect(&LayerViewerDialog,SIGNAL(ungroupSelectedLayers()),SLOT(on_LayerViewer_ungroupLayers()));
    connect(&LayerViewerDialog,SIGNAL(moveSelectedLayersUp()),SLOT(on_LayerViewer_moveLayersUp()));
    connect(&LayerViewerDialog,SIGNAL(moveSelectedLayersDown()),SLOT(on_LayerViewer_moveLayersDown()));
    connect(&LayerViewerDialog,SIGNAL(moveSelectedLayersToFront()),SLOT(on_LayerViewer_moveLayersToFront()));
    connect(&LayerViewerDialog,SIGNAL(moveSelectedLayersToBack()),SLOT(on_LayerViewer_moveLayersToBack()));

    //unchecks the tool bar buttons when the corresponding window is closed/rejected (QDialog)
    connect(&LogViewerDialog,SIGNAL(rejected()),SLOT(on_LogViewer_closed()));
    connect(&LayerViewerDialog,SIGNAL(rejected()),SLOT(on_LayerViewer_closed()));

    //hack to remove the first Tab created by the qt designer
    this->ui->tabWidget->newTab();
    this->ui->tabWidget->removeTab(0);

    //Add Undo/Redo To Toolbar
    QAction* undo = pm->getUndoAction(this);
    undo->setIcon(QIcon(":/Toolbar/Undo.ico"));
    undo->setShortcut(QKeySequence::Undo);
    this->ui->mainToolBar->insertAction(this->ui->actionUndoList,undo);
    QAction* redo = pm->getRedoAction(this);
    redo->setIcon(QIcon(":/Toolbar/Redo.ico"));
    redo->setShortcut(QKeySequence::Redo);
    this->ui->mainToolBar->insertAction(this->ui->actionCropArray,redo);

    //Create UndoViewerDialog and link it to the UndoGroup
    this->UndoViewerDialog = new UndoViewer(this);
    pm->setUndoViewer(this->UndoViewerDialog->getView());

    //TODO proper check if the grid is enabled after loading a project or change of array
    this->ui->actionShowGrid->setChecked(true);

    showMaximized();
}
Exemple #12
0
void MainWindow::LoadSettings()
{
    // Window/dialog sizes
    if (mSettings->value(SETTINGS_WINDOW_MAXIMIZED, false).toBool()) {
        showMaximized();
    } else {
        resize(mSettings->value(SETTINGS_WINDOW_WIDTH, 800).toInt(),
               mSettings->value(SETTINGS_WINDOW_HEIGHT, 600).toInt());
    }

    ShowTypes *types = mUI.mResults->GetShowTypes();
    mUI.mActionShowStyle->setChecked(types->isShown(ShowTypes::ShowStyle));
    mUI.mActionShowErrors->setChecked(types->isShown(ShowTypes::ShowErrors));
    mUI.mActionShowWarnings->setChecked(types->isShown(ShowTypes::ShowWarnings));
    mUI.mActionShowPortability->setChecked(types->isShown(ShowTypes::ShowPortability));
    mUI.mActionShowPerformance->setChecked(types->isShown(ShowTypes::ShowPerformance));
    mUI.mActionShowInformation->setChecked(types->isShown(ShowTypes::ShowInformation));

    const bool stdCpp11 = mSettings->value(SETTINGS_STD_CPP11, false).toBool();
    mUI.mActionCplusplus11->setChecked(stdCpp11);
    const bool stdC99 = mSettings->value(SETTINGS_STD_C99, false).toBool();
    mUI.mActionC99->setChecked(stdC99);
    const bool stdPosix = mSettings->value(SETTINGS_STD_POSIX, false).toBool();
    mUI.mActionPosix->setChecked(stdPosix);

    // Main window settings
    const bool showMainToolbar = mSettings->value(SETTINGS_TOOLBARS_MAIN_SHOW, true).toBool();
    mUI.mActionToolBarMain->setChecked(showMainToolbar);
    mUI.mToolBarMain->setVisible(showMainToolbar);

    const bool showViewToolbar = mSettings->value(SETTINGS_TOOLBARS_VIEW_SHOW, true).toBool();
    mUI.mActionToolBarView->setChecked(showViewToolbar);
    mUI.mToolBarView->setVisible(showViewToolbar);

    const bool showFilterToolbar = mSettings->value(SETTINGS_TOOLBARS_FILTER_SHOW, true).toBool();
    mUI.mActionToolBarFilter->setChecked(showFilterToolbar);
    mUI.mToolBarFilter->setVisible(showFilterToolbar);

    SetLanguage(mSettings->value(SETTINGS_LANGUAGE, mTranslation->SuggestLanguage()).toString());

    bool succeeded = mApplications->LoadSettings();
    if (!succeeded) {
        const QString msg = tr("There was a problem with loading the editor application settings.\n\n"
                               "This is probably because the settings were changed between the Cppcheck versions. "
                               "Please check (and fix) the editor application settings, otherwise the editor "
                               "program might not start correctly.");
        QMessageBox msgBox(QMessageBox::Warning,
                           tr("Cppcheck"),
                           msg,
                           QMessageBox::Ok,
                           this);
        msgBox.exec();

    }

}
Exemple #13
0
BeamDialog::BeamDialog(Beam &a_beam,QWidget *parent) :
    QDialog(parent),
    beam(a_beam)
{
    setupUi(this);
#if defined(Q_WS_S60)
    showMaximized();
#endif
    spanLength->setValue(beam.length());
}
void MainWindow::showExpanded()
{
#ifdef Q_OS_SYMBIAN
	showFullScreen();
#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
	showMaximized();
#else
	show();
#endif
}
Exemple #15
0
void MainWindow::showExpanded()
{
#if defined(Q_WS_SIMULATOR)
    showFullScreen();
#elif defined(Q_WS_MAEMO_5)
    showMaximized();
#else
    show();
#endif
}
Exemple #16
0
void MainWindow::LoadSettings()
{
	QSettings settings(QApplication::applicationDirPath() + "/config.cfg", QSettings::IniFormat);
	
	setGeometry(settings.value("mainWindow/geometry").toRect());
	restoreState(settings.value("mainWindow/windowState").toByteArray());

	if (settings.value("mainWindow/isMaximized").toBool())
 		showMaximized();
}
Exemple #17
0
void QmlApplicationViewer::showExpanded()
{
#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN)
    showFullScreen();
#elif defined(Q_WS_MAEMO_5)
    showMaximized();
#else
    show();
#endif
}
void QmlApplicationViewer::showExpanded()
{
#ifdef Q_OS_SYMBIAN
    showFullScreen();
#elif defined(Q_WS_MAEMO_5)
    showMaximized();
#else
    show();
#endif
}
int main(int argc, char * argv[])
{
    auto app = new QApplication(argc, argv);
    auto editor = new EspinaVolumeEditor(app);

    editor->showMaximized();
    app->exec();
    
    delete editor;
}
Exemple #20
0
void UnixWindow::maximize()
{
    if (isMaximized())
    {
        showNormal();
    }
    else
    {
        showMaximized();
    }
}
void MainWindow::timerEvent(QTimerEvent *e)
{
    if(!e)
        return;
    if(e->timerId() == updateTimer && !loginStatus)
    {
        loginStatus = true;
        login();
        showMaximized();
    }
}
void MainWindow::desktopResized(int p)
{
    qDebug() << "Desktop resized event: " << p;
    if (mainSettings->value("view/fullscreen").toBool()) {
        showFullScreen();
    } else if (mainSettings->value("view/maximized").toBool()) {
        showMaximized();
    } else if (mainSettings->value("view/fixed-size").toBool()) {
        centerFixedSizeWindow();
    }
}
Exemple #23
0
void Screen::keyPressEvent(QKeyEvent* ev) {
    QLabel::keyPressEvent(ev);
    if (ev->key() == Qt::Key_Escape) {
        if (isFullScreen()) {
            showNormal();
            showMaximized();
        } else {
            showFullScreen();
        }
    }
}
Exemple #24
0
void VSCCameraAdd::floatingAction()
{
    if (m_bFloated == TRUE)
    {
        return;
    }
    m_pParent = parentWidget();
    setParent(NULL);
    showMaximized();
    m_bFloated = TRUE;
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    //window_manager  = NULL;
    first = true;

    //add_window_widget_to_dock();

    //link_gui_to_core();
    showMaximized();
}
Exemple #26
0
void MainWindow::on_actionFullScreen_toggled(bool enable)
{
    if (enable) {
        m_wasMaximized = isMaximized();
        showFullScreen();
    } else {
        if (m_wasMaximized)
            showMaximized();
        else
            showNormal();
    }
}
MainWindow::MainWindow(QDesktopWidget *parent): QMainWindow(parent)
{
    this->ui = new QDeclarativeView;
    this->ui->setSource(QUrl("qrc:/qml/ui.qml"));
    setCentralWidget(this->ui);

    this->ui->setResizeMode(QDeclarativeView::SizeRootObjectToView);

      /* maximize window */
      showMaximized();
      // showFullScreen();
}
Exemple #28
0
void NMainWindow::toggleMaximize()
{
    if (isMaximized()) {
        showNormal();
        resize(m_unmaximizedSize);
        move(m_unmaximizedPos);
        m_unmaximizedPos = QPoint();
        m_unmaximizedSize = QSize();
    } else {
        m_unmaximizedPos = pos();
        m_unmaximizedSize = size();
        showMaximized();
#ifdef Q_WS_WIN
        setGeometry(QApplication::desktop()->availableGeometry());
        showMaximized();
#endif
    }

    emit fullScreenEnabled(false);
    emit maximizeEnabled(isMaximized());
}
void MainWindow::readSettings()
{
    resize(settings->getWindowSize("MainWindow"));
    move(settings->getWindowPos("MainWindow"));
    if (settings->isWindowMaximized("MainWindow"))
        showMaximized();

    logWindow->resize(settings->getWindowSize("LogWindow"));
    logWindow->move(settings->getWindowPos("LogWindow"));
    if (settings->isWindowMaximized("LogWindow"))
        logWindow->showMaximized();
}
Exemple #30
0
DM3d::DM3d(QWidget *parent)
    : QMainWindow(parent)
{
	ui.setupUi(this);
    ml=new ManagerLight(this);
    ml->setWindowFlags(Qt::Tool);
    //ml->setWindowOpacity(0.75);
    ml->gl=ui.widget;
    showMaximized();
    ml->setGeometry(width()-410,height()-260,ml->width(),ml->height());
    ml->show();
}