Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     $this->objectName = PQNAME;
     $this->currentPath = QDir::CurrentPath;
     $this->iconsPath = $this->currentPath . '/core/design/faenza-icons';
     $this->qticonsPath = $this->currentPath . '/core/design/qt-icons';
     $this->pqpackPath = ___pq_prepare_path(getenv("PROGRAMFILES")) . '/PQPack';
     // Components
     $this->csPath = $this->currentPath . '/core/components';
     $this->csName = 'component.php';
     $this->csProperties = 'properties.php';
     $this->csEvents = 'events.php';
     $this->csIcon = 'icon.png';
     $this->init();
 }
Esempio n. 2
0
 private function createProjectDir()
 {
     $projectDir = $this->user_projects_path . '/' . $this->newProjectName_lineEdit->text;
     $messageBox = new QMessageBox();
     if (file_exists($projectDir) || !mkdir($projectDir)) {
         $messageBox->critical(0, tr('Error creating directory'), tr('Cannot create directory') . " `{$projectDir}`", tr('Ok'));
         $messageBox->free();
         return false;
     }
     $currentPath = QDir::CurrentPath;
     if (!copy("{$currentPath}/pqengine.dll", "{$projectDir}/pqengine.dll") || !copy("{$currentPath}/php5ts.dll", "{$projectDir}/php5ts.dll") || !copy("{$currentPath}/PQCreator.exe", "{$projectDir}/pqengine.exe") || file_put_contents("{$projectDir}/main.php", '<?php') === FALSE) {
         $messageBox->critical(0, tr('Error creating project data'), tr('Cannot create project core files'), tr('Ok'));
         $messageBox->free();
         return false;
     }
     $this->projectDir = ___pq_prepare_path($projectDir);
     return true;
 }