PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
LauncherConfig Class Reference

#include <LauncherConfig.h>

Public Member Functions

 LauncherConfig ()
 
 ~LauncherConfig ()
 
bool LoadConfig ()
 
bool SaveConfig ()
 
std::string GetExperimentDirectory () const
 
std::string GetSubjectCode () const
 
std::string GetLanguage () const
 
bool GetFullscreen () const
 
const std::vector< RecentExperiment > & GetRecentExperiments () const
 
bool GetAutoUpload () const
 
std::string GetUploadToken () const
 
std::string GetUploadURL () const
 
std::string GetWorkspacePath () const
 
std::string GetBatteryPath () const
 
std::string GetPeblExecutablePath () const
 
std::string GetDataOutputPath () const
 
int GetFontSize () const
 
std::string GetCurrentStudyPath () const
 
std::string GetCurrentChainName () const
 
int GetWindowWidth () const
 
int GetWindowHeight () const
 
std::string GetExternalEditor () const
 
void SetExperimentDirectory (const std::string &dir)
 
void SetSubjectCode (const std::string &code)
 
void SetLanguage (const std::string &lang)
 
void SetFullscreen (bool fullscreen)
 
void SetAutoUpload (bool autoUpload)
 
void SetUploadToken (const std::string &token)
 
void SetUploadURL (const std::string &url)
 
void SetWorkspacePath (const std::string &path)
 
void SetBatteryPath (const std::string &path)
 
void SetPeblExecutablePath (const std::string &path)
 
void SetDataOutputPath (const std::string &path)
 
void SetFontSize (int size)
 
void SetCurrentStudyPath (const std::string &path)
 
void SetCurrentChainName (const std::string &name)
 
void SetWindowWidth (int width)
 
void SetWindowHeight (int height)
 
void SetExternalEditor (const std::string &editor)
 
void AddRecentExperiment (const std::string &path, const std::string &name)
 

Detailed Description

Definition at line 26 of file LauncherConfig.h.

Constructor & Destructor Documentation

◆ LauncherConfig()

LauncherConfig::LauncherConfig ( )

Definition at line 35 of file LauncherConfig.cpp.

36 : mExperimentDirectory("")
37 , mSubjectCode("test")
38 , mLanguage("en")
39 , mFullscreen(false)
40 , mAutoUpload(false)
41 , mUploadToken("")
42 , mUploadURL("https://peblhub.online/api/upload")
43 , mWorkspacePath("")
44 , mBatteryPath("")
45 , mPeblExecutablePath("")
46 , mDataOutputPath("")
47 , mFontSize(16)
48 , mWindowWidth(1280)
49 , mWindowHeight(720)
50 , mCurrentStudyPath("")
51 , mCurrentChainName("")
52{
53 // Set platform-specific default external editor
54#ifdef _WIN32
55 mExternalEditor = "start";
56#elif __APPLE__
57 mExternalEditor = "open";
58#else
59 mExternalEditor = "xdg-open";
60#endif
61
62 // Detect battery path using BinReloc (relative to launcher executable)
63 mBatteryPath = DetectPEBLInstallation();
64
65 // For backward compatibility, also set experiment directory to battery path
66 mExperimentDirectory = mBatteryPath;
67
68 // Detect PEBL executable path (same directory as launcher)
69#ifdef _WIN32
70 char exePath[MAX_PATH];
71 DWORD len = GetModuleFileNameA(NULL, exePath, MAX_PATH);
72 if (len > 0 && len < MAX_PATH) {
73 std::string exePathStr(exePath);
74 size_t lastSep = exePathStr.find_last_of("/\\");
75 if (lastSep != std::string::npos) {
76 std::string exeDir = exePathStr.substr(0, lastSep);
77 mPeblExecutablePath = exeDir + "\\pebl2.exe";
78 struct stat st;
79 if (stat(mPeblExecutablePath.c_str(), &st) == 0) {
80 printf("Found PEBL executable at: %s\n", mPeblExecutablePath.c_str());
81 } else {
82 printf("Warning: PEBL executable not found at: %s\n", mPeblExecutablePath.c_str());
83 mPeblExecutablePath = "";
84 }
85 }
86 }
87#else
88 // On Linux, use BinReloc to find launcher location
89 BrInitError error;
90 if (br_init(&error) != 0) {
91 char* exeDir = br_find_exe_dir("/usr/local/bin");
92 if (exeDir) {
93 mPeblExecutablePath = std::string(exeDir) + "/pebl2";
94 free(exeDir);
95 struct stat st;
96 if (stat(mPeblExecutablePath.c_str(), &st) == 0) {
97 printf("Found PEBL executable at: %s\n", mPeblExecutablePath.c_str());
98 } else {
99 printf("Warning: PEBL executable not found at: %s\n", mPeblExecutablePath.c_str());
100 mPeblExecutablePath = "";
101 }
102 }
103 }
104#endif
105
106 // Set workspace path based on mode
107 if (IsPortableMode()) {
108 // In portable mode, workspace is the portable root directory
109 // This allows access to PEBL/battery, PEBL/demo, PEBL/tutorial, etc.
110 std::string portableRoot = GetPortableWorkspacePath();
111
112 // Convert relative path to absolute
113#ifdef _WIN32
114 char absPath[MAX_PATH];
115 if (GetFullPathNameA(portableRoot.c_str(), MAX_PATH, absPath, NULL) > 0) {
116 mWorkspacePath = absPath;
117 } else {
118 mWorkspacePath = portableRoot;
119 }
120#else
121 char* absPath = realpath(portableRoot.c_str(), nullptr);
122 if (absPath) {
123 mWorkspacePath = absPath;
124 free(absPath);
125 } else {
126 mWorkspacePath = portableRoot;
127 }
128#endif
129 printf("Portable mode: workspace set to %s\n", mWorkspacePath.c_str());
130
131 // In portable mode, data output goes to workspace/my_studies
132 if (!mWorkspacePath.empty()) {
133#ifdef _WIN32
134 mDataOutputPath = mWorkspacePath + "\\my_studies";
135#else
136 mDataOutputPath = mWorkspacePath + "/my_studies";
137#endif
138 }
139 } else {
140 // Installed mode: use Documents/pebl-exp.VERSION/
141 std::string documentsPath = GetDocumentsPath();
142 if (!documentsPath.empty()) {
143#ifdef _WIN32
144 mWorkspacePath = documentsPath + "\\pebl-exp." + PEBL_VERSION;
145#else
146 mWorkspacePath = documentsPath + "/pebl-exp." + PEBL_VERSION;
147#endif
148 }
149
150 // Set default data output path (workspace/my_studies)
151 if (!mWorkspacePath.empty()) {
152#ifdef _WIN32
153 mDataOutputPath = mWorkspacePath + "\\my_studies";
154#else
155 mDataOutputPath = mWorkspacePath + "/my_studies";
156#endif
157 }
158 }
159}
#define NULL
Definition BinReloc.cpp:317
int br_init(BrInitError *error)
Definition BinReloc.cpp:338
char * br_find_exe_dir(const char *default_dir)
Definition BinReloc.cpp:405
BrInitError
Definition BinReloc.h:22
#define PEBL_VERSION

References br_find_exe_dir(), br_init(), NULL, and PEBL_VERSION.

◆ ~LauncherConfig()

LauncherConfig::~LauncherConfig ( )

Definition at line 161 of file LauncherConfig.cpp.

162{
163}

Member Function Documentation

◆ AddRecentExperiment()

void LauncherConfig::AddRecentExperiment ( const std::string &  path,
const std::string &  name 
)

Definition at line 714 of file LauncherConfig.cpp.

715{
716 // Check if already in list
717 for (auto it = mRecentExperiments.begin(); it != mRecentExperiments.end(); ++it) {
718 if (it->path == path) {
719 // Update timestamp and move to front
720 it->lastRun = time(nullptr);
721 RecentExperiment recent = *it;
722 mRecentExperiments.erase(it);
723 mRecentExperiments.insert(mRecentExperiments.begin(), recent);
724 return;
725 }
726 }
727
728 // Add new entry at front
729 RecentExperiment recent;
730 recent.path = path;
731 recent.name = name;
732 recent.lastRun = time(nullptr);
733 mRecentExperiments.insert(mRecentExperiments.begin(), recent);
734
735 // Limit to MAX_RECENT_EXPERIMENTS
736 if ((int)mRecentExperiments.size() > MAX_RECENT_EXPERIMENTS) {
737 mRecentExperiments.resize(MAX_RECENT_EXPERIMENTS);
738 }
739}

References RecentExperiment::lastRun, RecentExperiment::name, and RecentExperiment::path.

◆ GetAutoUpload()

bool LauncherConfig::GetAutoUpload ( ) const
inline

Definition at line 40 of file LauncherConfig.h.

40{ return mAutoUpload; }

◆ GetBatteryPath()

std::string LauncherConfig::GetBatteryPath ( ) const
inline

Definition at line 44 of file LauncherConfig.h.

44{ return mBatteryPath; }

Referenced by LauncherUI::LauncherUI().

◆ GetCurrentChainName()

std::string LauncherConfig::GetCurrentChainName ( ) const
inline

Definition at line 49 of file LauncherConfig.h.

49{ return mCurrentChainName; }

Referenced by LauncherUI::LauncherUI().

◆ GetCurrentStudyPath()

std::string LauncherConfig::GetCurrentStudyPath ( ) const
inline

Definition at line 48 of file LauncherConfig.h.

48{ return mCurrentStudyPath; }

Referenced by LauncherUI::LauncherUI().

◆ GetDataOutputPath()

std::string LauncherConfig::GetDataOutputPath ( ) const
inline

Definition at line 46 of file LauncherConfig.h.

46{ return mDataOutputPath; }

◆ GetExperimentDirectory()

std::string LauncherConfig::GetExperimentDirectory ( ) const
inline

Definition at line 35 of file LauncherConfig.h.

35{ return mExperimentDirectory; }

Referenced by LauncherUI::LauncherUI().

◆ GetExternalEditor()

std::string LauncherConfig::GetExternalEditor ( ) const
inline

Definition at line 52 of file LauncherConfig.h.

52{ return mExternalEditor; }

◆ GetFontSize()

int LauncherConfig::GetFontSize ( ) const
inline

Definition at line 47 of file LauncherConfig.h.

47{ return mFontSize; }

Referenced by main().

◆ GetFullscreen()

bool LauncherConfig::GetFullscreen ( ) const
inline

Definition at line 38 of file LauncherConfig.h.

38{ return mFullscreen; }

Referenced by LauncherUI::LauncherUI().

◆ GetLanguage()

std::string LauncherConfig::GetLanguage ( ) const
inline

Definition at line 37 of file LauncherConfig.h.

37{ return mLanguage; }

Referenced by LauncherUI::LauncherUI().

◆ GetPeblExecutablePath()

std::string LauncherConfig::GetPeblExecutablePath ( ) const
inline

Definition at line 45 of file LauncherConfig.h.

45{ return mPeblExecutablePath; }

◆ GetRecentExperiments()

const std::vector< RecentExperiment > & LauncherConfig::GetRecentExperiments ( ) const
inline

Definition at line 39 of file LauncherConfig.h.

39{ return mRecentExperiments; }

◆ GetSubjectCode()

std::string LauncherConfig::GetSubjectCode ( ) const
inline

Definition at line 36 of file LauncherConfig.h.

36{ return mSubjectCode; }

Referenced by LauncherUI::LauncherUI().

◆ GetUploadToken()

std::string LauncherConfig::GetUploadToken ( ) const
inline

Definition at line 41 of file LauncherConfig.h.

41{ return mUploadToken; }

◆ GetUploadURL()

std::string LauncherConfig::GetUploadURL ( ) const
inline

Definition at line 42 of file LauncherConfig.h.

42{ return mUploadURL; }

◆ GetWindowHeight()

int LauncherConfig::GetWindowHeight ( ) const
inline

Definition at line 51 of file LauncherConfig.h.

51{ return mWindowHeight; }

Referenced by main().

◆ GetWindowWidth()

int LauncherConfig::GetWindowWidth ( ) const
inline

Definition at line 50 of file LauncherConfig.h.

50{ return mWindowWidth; }

Referenced by main().

◆ GetWorkspacePath()

std::string LauncherConfig::GetWorkspacePath ( ) const
inline

Definition at line 43 of file LauncherConfig.h.

43{ return mWorkspacePath; }

Referenced by LauncherUI::LauncherUI(), and main().

◆ LoadConfig()

bool LauncherConfig::LoadConfig ( )

Definition at line 423 of file LauncherConfig.cpp.

424{
425 std::string configPath = GetConfigFilePath();
426 std::ifstream configFile(configPath);
427
428 if (!configFile.is_open()) {
429 // Config file doesn't exist yet, use defaults
430 return false;
431 }
432
433 // In portable mode, skip loading path-related settings
434 // They should be re-detected each time based on current location
435 bool portable = IsPortableMode();
436
437 std::string line;
438 std::string currentSection = "";
439
440 while (std::getline(configFile, line)) {
441 // Skip empty lines and comments
442 if (line.empty() || line[0] == '#') {
443 continue;
444 }
445
446 // Check for section headers
447 if (line[0] == '[' && line[line.length()-1] == ']') {
448 currentSection = line.substr(1, line.length()-2);
449 continue;
450 }
451
452 // Parse key=value pairs
453 size_t equalPos = line.find('=');
454 if (equalPos == std::string::npos) {
455 continue;
456 }
457
458 std::string key = line.substr(0, equalPos);
459 std::string value = line.substr(equalPos + 1);
460
461 // Trim whitespace
462 key.erase(0, key.find_first_not_of(" \t"));
463 key.erase(key.find_last_not_of(" \t") + 1);
464 value.erase(0, value.find_first_not_of(" \t"));
465 value.erase(value.find_last_not_of(" \t") + 1);
466
467 // Apply configuration values based on section
468 if (currentSection == "") {
469 // In portable mode, skip path-related settings (except relative study paths)
470 if (portable) {
471 if (key == "experiment_directory" || key == "workspace_path" ||
472 key == "battery_path" || key == "pebl_executable_path" ||
473 key == "data_output_path") {
474 continue; // Skip - will be re-detected
475 }
476 // Note: current_study_path is handled specially in its own case below
477 }
478
479 if (key == "experiment_directory") {
480 mExperimentDirectory = value;
481 } else if (key == "subject_code") {
482 mSubjectCode = value;
483 } else if (key == "language") {
484 mLanguage = value;
485 } else if (key == "fullscreen") {
486 mFullscreen = (value == "true" || value == "1");
487 } else if (key == "auto_upload") {
488 mAutoUpload = (value == "true" || value == "1");
489 } else if (key == "upload_token") {
490 mUploadToken = value;
491 } else if (key == "upload_url") {
492 mUploadURL = value;
493 } else if (key == "workspace_path") {
494 mWorkspacePath = value;
495 } else if (key == "battery_path") {
496 mBatteryPath = value;
497 } else if (key == "pebl_executable_path") {
498 mPeblExecutablePath = value;
499 } else if (key == "data_output_path") {
500 mDataOutputPath = value;
501 } else if (key == "font_size") {
502 try {
503 mFontSize = std::stoi(value);
504 } catch (...) {
505 printf("Warning: Invalid font_size value, using default\n");
506 }
507 } else if (key == "window_width") {
508 try {
509 mWindowWidth = std::stoi(value);
510 } catch (...) {
511 printf("Warning: Invalid window_width value, using default\n");
512 }
513 } else if (key == "window_height") {
514 try {
515 mWindowHeight = std::stoi(value);
516 } catch (...) {
517 printf("Warning: Invalid window_height value, using default\n");
518 }
519 } else if (key == "current_study_path") {
520 if (portable && !value.empty()) {
521 // In portable mode, convert relative path to absolute
522 // Check if it's already absolute
523 if (value[0] != '/' && !(value.length() > 1 && value[1] == ':')) {
524 // It's a relative path - make it absolute relative to workspace
525 try {
526 fs::path relativePath(value);
527 fs::path absolutePath = fs::absolute(fs::path(mWorkspacePath) / relativePath);
528 mCurrentStudyPath = absolutePath.string();
529 } catch (...) {
530 mCurrentStudyPath = value; // Fallback to as-is
531 }
532 } else {
533 // Absolute path in portable mode - skip it
534 mCurrentStudyPath = "";
535 }
536 } else {
537 mCurrentStudyPath = value;
538 }
539 } else if (key == "current_chain_name") {
540 mCurrentChainName = value;
541 } else if (key == "external_editor") {
542 mExternalEditor = value;
543 }
544 } else if (currentSection == "recent") {
545 // Parse recent experiment entry: name|path|timestamp
546 size_t pipe1 = value.find('|');
547 if (pipe1 != std::string::npos) {
548 size_t pipe2 = value.find('|', pipe1 + 1);
549 if (pipe2 != std::string::npos) {
550 try {
551 std::string timestampStr = value.substr(pipe2 + 1);
552 // Skip if timestamp is empty or invalid
553 if (timestampStr.empty()) {
554 continue;
555 }
556
557 RecentExperiment recent;
558 recent.name = value.substr(0, pipe1);
559 recent.path = value.substr(pipe1 + 1, pipe2 - pipe1 - 1);
560 recent.lastRun = std::stol(timestampStr);
561 mRecentExperiments.push_back(recent);
562 } catch (const std::invalid_argument& e) {
563 // Skip malformed entry
564 printf("Warning: Skipping malformed recent experiment entry: %s\n", value.c_str());
565 } catch (const std::out_of_range& e) {
566 // Skip out of range timestamp
567 printf("Warning: Skipping out-of-range timestamp in recent experiment entry: %s\n", value.c_str());
568 }
569 }
570 }
571 }
572 }
573
574 configFile.close();
575
576 // Validate loaded paths — a saved path may point to a now-gone AppImage mount
577 // (e.g. /tmp/.mount_PEBL-xxx/...) or a previous installation that no longer exists.
578 // If either critical path is missing, re-run auto-detection so the launcher works
579 // correctly regardless of how it was first invoked.
580 struct stat st;
581 if (!mBatteryPath.empty() &&
582 !(stat(mBatteryPath.c_str(), &st) == 0 && S_ISDIR(st.st_mode)))
583 {
584 printf("Warning: Saved battery_path no longer exists: %s\n", mBatteryPath.c_str());
585 printf("Re-detecting PEBL installation...\n");
586 mBatteryPath = DetectPEBLInstallation();
587 if (!mBatteryPath.empty()) {
588 printf("Re-detected battery at: %s\n", mBatteryPath.c_str());
589 } else {
590 printf("Warning: Could not auto-detect battery path.\n");
591 }
592 }
593
594 if (!mPeblExecutablePath.empty() &&
595 !(stat(mPeblExecutablePath.c_str(), &st) == 0 && S_ISREG(st.st_mode)))
596 {
597 printf("Warning: Saved pebl_executable_path no longer exists: %s\n", mPeblExecutablePath.c_str());
598 // Derive pebl2 location from battery path: battery/ is a sibling of bin/
599 if (!mBatteryPath.empty()) {
600#ifdef _WIN32
601 std::string candidate = mBatteryPath + "\\..\\bin\\pebl2.exe";
602#else
603 std::string candidate = mBatteryPath + "/../bin/pebl2";
604#endif
605 if (stat(candidate.c_str(), &st) == 0 && S_ISREG(st.st_mode)) {
606 mPeblExecutablePath = candidate;
607 printf("Re-detected PEBL executable at: %s\n", mPeblExecutablePath.c_str());
608 } else {
609 printf("Warning: Could not auto-detect PEBL executable path.\n");
610 mPeblExecutablePath = "";
611 }
612 }
613 }
614
615 return true;
616}

References RecentExperiment::lastRun, RecentExperiment::name, and RecentExperiment::path.

Referenced by main().

◆ SaveConfig()

bool LauncherConfig::SaveConfig ( )

Definition at line 618 of file LauncherConfig.cpp.

619{
620 std::string configPath = GetConfigFilePath();
621 bool portable = IsPortableMode();
622
623 // Create directory (and any parent directories) if it doesn't exist
624 fs::path configDir = fs::path(configPath).parent_path();
625 if (!configDir.empty()) {
626 try {
627 fs::create_directories(configDir);
628 } catch (const fs::filesystem_error& e) {
629 printf("Warning: Could not create config directory: %s\n", e.what());
630 }
631 }
632
633 std::ofstream configFile(configPath);
634 if (!configFile.is_open()) {
635 return false;
636 }
637
638 // Write configuration
639 configFile << "# PEBL Launcher Configuration" << std::endl;
640 configFile << "# Auto-generated - edit at your own risk" << std::endl;
641 if (portable) {
642 configFile << "# Portable mode - path settings are auto-detected on launch" << std::endl;
643 }
644 configFile << std::endl;
645
646 // In portable mode, don't save absolute path settings
647 // They will be re-detected based on the launcher's location
648 if (!portable) {
649 configFile << "experiment_directory=" << mExperimentDirectory << std::endl;
650 }
651 configFile << "subject_code=" << mSubjectCode << std::endl;
652 configFile << "language=" << mLanguage << std::endl;
653 configFile << "fullscreen=" << (mFullscreen ? "true" : "false") << std::endl;
654 configFile << std::endl;
655
656 // In portable mode, skip path settings entirely
657 if (!portable) {
658 configFile << "# File paths" << std::endl;
659 configFile << "workspace_path=" << mWorkspacePath << std::endl;
660 configFile << "battery_path=" << mBatteryPath << std::endl;
661 configFile << "pebl_executable_path=" << mPeblExecutablePath << std::endl;
662 configFile << "data_output_path=" << mDataOutputPath << std::endl;
663 configFile << std::endl;
664 }
665
666 configFile << "# Upload settings" << std::endl;
667 configFile << "auto_upload=" << (mAutoUpload ? "true" : "false") << std::endl;
668 configFile << "upload_token=" << mUploadToken << std::endl;
669 configFile << "upload_url=" << mUploadURL << std::endl;
670 configFile << std::endl;
671
672 configFile << "# UI settings" << std::endl;
673 configFile << "font_size=" << mFontSize << std::endl;
674 configFile << "window_width=" << mWindowWidth << std::endl;
675 configFile << "window_height=" << mWindowHeight << std::endl;
676 configFile << "external_editor=" << mExternalEditor << std::endl;
677 configFile << std::endl;
678
679 configFile << "# Session state" << std::endl;
680 // Save study path - in portable mode, convert to relative path
681 if (!mCurrentStudyPath.empty()) {
682 if (portable) {
683 // Convert absolute path to relative path for portable mode
684 try {
685 fs::path studyPath(mCurrentStudyPath);
686 fs::path workspacePath(mWorkspacePath);
687 fs::path relativePath = fs::relative(studyPath, workspacePath);
688 configFile << "current_study_path=" << relativePath.string() << std::endl;
689 } catch (...) {
690 // If relative path conversion fails, skip saving
691 printf("Warning: Could not convert study path to relative path\n");
692 }
693 } else {
694 configFile << "current_study_path=" << mCurrentStudyPath << std::endl;
695 }
696 }
697 configFile << "current_chain_name=" << mCurrentChainName << std::endl;
698
699 // Save recent experiments
700 if (!mRecentExperiments.empty()) {
701 configFile << std::endl;
702 configFile << "[recent]" << std::endl;
703 for (size_t i = 0; i < mRecentExperiments.size(); i++) {
704 const RecentExperiment& recent = mRecentExperiments[i];
705 configFile << "recent" << i << "=" << recent.name << "|"
706 << recent.path << "|" << recent.lastRun << std::endl;
707 }
708 }
709
710 configFile.close();
711 return true;
712}

References RecentExperiment::lastRun, RecentExperiment::name, and RecentExperiment::path.

Referenced by main().

◆ SetAutoUpload()

void LauncherConfig::SetAutoUpload ( bool  autoUpload)
inline

Definition at line 59 of file LauncherConfig.h.

59{ mAutoUpload = autoUpload; }

◆ SetBatteryPath()

void LauncherConfig::SetBatteryPath ( const std::string &  path)
inline

Definition at line 63 of file LauncherConfig.h.

63{ mBatteryPath = path; }

◆ SetCurrentChainName()

void LauncherConfig::SetCurrentChainName ( const std::string &  name)
inline

Definition at line 68 of file LauncherConfig.h.

68{ mCurrentChainName = name; }

◆ SetCurrentStudyPath()

void LauncherConfig::SetCurrentStudyPath ( const std::string &  path)
inline

Definition at line 67 of file LauncherConfig.h.

67{ mCurrentStudyPath = path; }

◆ SetDataOutputPath()

void LauncherConfig::SetDataOutputPath ( const std::string &  path)
inline

Definition at line 65 of file LauncherConfig.h.

65{ mDataOutputPath = path; }

◆ SetExperimentDirectory()

void LauncherConfig::SetExperimentDirectory ( const std::string &  dir)
inline

Definition at line 55 of file LauncherConfig.h.

55{ mExperimentDirectory = dir; }

◆ SetExternalEditor()

void LauncherConfig::SetExternalEditor ( const std::string &  editor)
inline

Definition at line 71 of file LauncherConfig.h.

71{ mExternalEditor = editor; }

◆ SetFontSize()

void LauncherConfig::SetFontSize ( int  size)
inline

Definition at line 66 of file LauncherConfig.h.

66{ mFontSize = size; }

◆ SetFullscreen()

void LauncherConfig::SetFullscreen ( bool  fullscreen)
inline

Definition at line 58 of file LauncherConfig.h.

58{ mFullscreen = fullscreen; }

◆ SetLanguage()

void LauncherConfig::SetLanguage ( const std::string &  lang)
inline

Definition at line 57 of file LauncherConfig.h.

57{ mLanguage = lang; }

◆ SetPeblExecutablePath()

void LauncherConfig::SetPeblExecutablePath ( const std::string &  path)
inline

Definition at line 64 of file LauncherConfig.h.

64{ mPeblExecutablePath = path; }

◆ SetSubjectCode()

void LauncherConfig::SetSubjectCode ( const std::string &  code)
inline

Definition at line 56 of file LauncherConfig.h.

56{ mSubjectCode = code; }

◆ SetUploadToken()

void LauncherConfig::SetUploadToken ( const std::string &  token)
inline

Definition at line 60 of file LauncherConfig.h.

60{ mUploadToken = token; }

◆ SetUploadURL()

void LauncherConfig::SetUploadURL ( const std::string &  url)
inline

Definition at line 61 of file LauncherConfig.h.

61{ mUploadURL = url; }

◆ SetWindowHeight()

void LauncherConfig::SetWindowHeight ( int  height)
inline

Definition at line 70 of file LauncherConfig.h.

70{ mWindowHeight = height; }

Referenced by main().

◆ SetWindowWidth()

void LauncherConfig::SetWindowWidth ( int  width)
inline

Definition at line 69 of file LauncherConfig.h.

69{ mWindowWidth = width; }

Referenced by main().

◆ SetWorkspacePath()

void LauncherConfig::SetWorkspacePath ( const std::string &  path)
inline

Definition at line 62 of file LauncherConfig.h.

62{ mWorkspacePath = path; }

The documentation for this class was generated from the following files: