<commit_before>#include <QDebug>
#include <QFlags>
#include <QFileDialog>
#include "gpeditor.h"
#include "ui_gpeditor.h"
#include "gpprojectviewer.h"
#include "gpscenegraphviewer.h"
#include "gpconsole.h"
#include "gppropertyviewer.h"
#include "gpsceneeditor.h"
#include "gpgamepreviewer.h"

GPEditor::GPEditor(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::GPEditor)
{
    ui->setupUi(this);

    if( !InitOnLaunch() )
    {
       qDebug("failed to init on launch");
    }
}

GPEditor::~GPEditor()
{
    delete ui;
}

///////////////////////////////////////////////////////////////////////////////
// define slots
///////////////////////////////////////////////////////////////////////////////

void GPEditor::DoNewProject()
{
    qDebug("do new project called");

    QString _dirPath = QFileDialog::getExistingDirectory(this,tr("New Project"));

    if( !_dirPath.isEmpty() )
    {
        qDebug(qPrintable(_dirPath));
    }
}

void GPEditor::DoOpenProject()
{
    qDebug("do Open Project called");
}

void GPEditor::DoCloseProject()
{
    qDebug("do Close project called");
}

void GPEditor::DoSaveProject()
{
    qDebug("do save project called");
}

//////////////////////////////////////////////////////////////////////////////

bool GPEditor::InitOnLaunch()
{
    // set dock options
    QFlags<DockOption> _options = this->dockOptions();

    _options |= QMainWindow::ForceTabbedDocks;

    this->setDockOptions(_options);

    // init project viewer
    GPProjectViewer * _projectViewer = new GPProjectViewer(this);

    this->addDockWidget(Qt::LeftDockWidgetArea,_projectViewer);

    // init scene graph viewer
    GPSceneGraphViewer * _sceneViewer = new GPSceneGraphViewer(this);

    this->addDockWidget(Qt::LeftDockWidgetArea,_sceneViewer);

    this->tabifyDockWidget(_sceneViewer,_projectViewer);

    // init console
    GPConsole * _console = new GPConsole(this);

    this->addDockWidget(Qt::BottomDockWidgetArea,_console);

    // init property pane
    GPPropertyViewer * _propertyViewer = new GPPropertyViewer(this);

    this->addDockWidget(Qt::RightDockWidgetArea,_propertyViewer);

    // init scene editor
    GPSceneEditor * _sceneEditor = new GPSceneEditor(this);

    this->setCentralWidget(_sceneEditor);

    // init game previewer
    GPGamePreviewer * _gamePreviewer = new GPGamePreviewer(this);

    this->setCentralWidget(_gamePreviewer);

    return true;
}<commit_msg>raise Project viewer<commit_after>#include <QDebug>
#include <QFlags>
#include <QFileDialog>
#include "gpeditor.h"
#include "ui_gpeditor.h"
#include "gpprojectviewer.h"
#include "gpscenegraphviewer.h"
#include "gpconsole.h"
#include "gppropertyviewer.h"
#include "gpsceneeditor.h"
#include "gpgamepreviewer.h"

GPEditor::GPEditor(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::GPEditor)
{
    ui->setupUi(this);

    if( !InitOnLaunch() )
    {
       qDebug("failed to init on launch");
    }
}

GPEditor::~GPEditor()
{
    delete ui;
}

///////////////////////////////////////////////////////////////////////////////
// define slots
///////////////////////////////////////////////////////////////////////////////

void GPEditor::DoNewProject()
{
    qDebug("do new project called");

    QString _dirPath = QFileDialog::getExistingDirectory(this,tr("New Project"));

    if( !_dirPath.isEmpty() )
    {
        qDebug(qPrintable(_dirPath));
    }
}

void GPEditor::DoOpenProject()
{
    qDebug("do Open Project called");
}

void GPEditor::DoCloseProject()
{
    qDebug("do Close project called");
}

void GPEditor::DoSaveProject()
{
    qDebug("do save project called");
}

//////////////////////////////////////////////////////////////////////////////

bool GPEditor::InitOnLaunch()
{
    // set dock options
    QFlags<DockOption> _options = this->dockOptions();

    _options |= QMainWindow::ForceTabbedDocks;

    this->setDockOptions(_options);

    // init project viewer
    GPProjectViewer * _projectViewer = new GPProjectViewer(this);

    this->addDockWidget(Qt::LeftDockWidgetArea,_projectViewer);

    // init scene graph viewer
    GPSceneGraphViewer * _sceneViewer = new GPSceneGraphViewer(this);

    this->addDockWidget(Qt::LeftDockWidgetArea,_sceneViewer);

    this->tabifyDockWidget(_projectViewer,_sceneViewer);

    _projectViewer->raise();

    // init console
    GPConsole * _console = new GPConsole(this);

    this->addDockWidget(Qt::BottomDockWidgetArea,_console);

    // init property pane
    GPPropertyViewer * _propertyViewer = new GPPropertyViewer(this);

    this->addDockWidget(Qt::RightDockWidgetArea,_propertyViewer);

    // init scene editor
    GPSceneEditor * _sceneEditor = new GPSceneEditor(this);

    this->setCentralWidget(_sceneEditor);

    // init game previewer
    GPGamePreviewer * _gamePreviewer = new GPGamePreviewer(this);

    this->setCentralWidget(_gamePreviewer);

    return true;
}
{'fraction_non_alphanumeric': 0.20902564102564103, 'fraction_numerical': 0.0, 'mean_word_length': 2.72782874617737, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7447119', 'n_tokens_mistral': 1536, 'n_tokens_neox': 1502, 'n_words': 269}