예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->button = new QPushButton(tr("quit"), $this);
     $this->connect($this->button, SIGNAL('clicked()'), QCoreApplication::instance(), SLOT('quit()'));
     $this->connect($this, SIGNAL('testSignal()'), $this, SLOT('testSlot()'));
     $this->connect($this, SIGNAL('testSignal()'), $this, SLOT('show()'));
     $this->slotTester = "";
 }
예제 #2
0
 function testInternals()
 {
     if (!QCoreApplication::instance()) {
         $argv = array("");
         $app = new QApplication(1, $argv);
     }
     $m = new MyWidget();
     __phpqt_unittest_invoke($m);
 }
예제 #3
0
 /**
  * test of creating an instance of QApplication if none exists
  */
 public function createQApplicationInstance()
 {
     if (!QCoreApplication::instance()) {
         $argc = 1;
         $argv = array("argv");
         $this->app = new QApplication($argc, $argv);
     } else {
         $this->app = QCoreApplication::instance();
     }
 }
예제 #4
0
 /**
  * runs a simple model/view app for a moment
  */
 function testModelView()
 {
     if (!QCoreApplication::instance()) {
         $argv = array("");
         $app = new QApplication(1, $argv);
     }
     $model_a = new MyItemModel();
     $treeView = new QTableView();
     $treeView->setModel($model_a);
     $treeView->show();
     QTimer::singleShot(100, QCoreApplication::instance(), SLOT("quit()"));
     $app->exec();
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->button = new QPushButton(tr("quit"), $this);
     $this->connect($this->button, SIGNAL('clicked()'), QCoreApplication::instance(), SLOT('quit()'));
 }
예제 #6
0
 /**
  * @slot
  */
 public function shootScreen()
 {
     if ($this->delaySpinBox->value() != 0) {
         QCoreApplication::instance()->beep();
     }
     $this->originalPixmap = QPixmap::grabWindow(QCoreApplication::instance()->desktop()->winId());
     $this->updateScreenshotLabel();
     $this->newScreenshotButton->setDisabled(false);
     if ($this->hideThisWindowCheckBox->isChecked()) {
         $this->show();
     }
 }