#include "LogsSorter.h"

CLogsSorter::CLogsSorter() : QObject()
{

}

int CLogsSorter::InitLogsSorter()
{
    mMainWindow.show();
    mMainWindow.mConfigPage->mProgramPtr = this;
    mSorterConfig.LoadLogsSorterConfig(".\\Config.bin");
    mMainWindow.mConfigPage->InitializeConfigData(&mSorterConfig.mLogsSorterConfig);

    mLogsHandler.mProgramPtr = this;
    mLogsHandler.SetSortingConfigData(&mSorterConfig.mLogsSorterConfig);


}

int CLogsSorter::SaveSorterConfigRequest(CLogsSorterConfigData NewConfig)
{
    mSorterConfig.SetNewConfig(NewConfig);
    return 0;
}

CLogsSorterConfigData *CLogsSorter::GetSorterConfigRequest()
{
    return &mSorterConfig.mLogsSorterConfig;
}
