[Kde-bindings] KDE/kdebindings/php/phpqt/examples/tabdialog

Thomas Moenicke tm at php-qt.org
Wed Nov 12 20:47:52 UTC 2008


SVN commit 883405 by moenicke:

* made the tabdialog example working

CCMAIL: kde-bindings at kde.org



 M  +7 -7      tabdialog.php  


--- trunk/KDE/kdebindings/php/phpqt/examples/tabdialog/tabdialog.php #883404:883405
@@ -56,7 +56,7 @@
 			$writable->setChecked(true);
 
 		$executable = new QCheckBox(tr("Executable"));
-		if( $fileInfo.isExecutable() )
+		if( $fileInfo->isExecutable() )
 			$executable->setChecked(true);
 
 		$ownerGroup = new QGroupBox(tr("Ownership"));
@@ -86,7 +86,7 @@
 		$mainLayout->addWidget($permissionsGroup);
 		$mainLayout->addWidget($ownerGroup);
 		$mainLayout->addStretch(1);
-		$setLayout($mainLayout);
+		$this->setLayout($mainLayout);
 	}
 }
 
@@ -98,10 +98,10 @@
 		$topLabel = new QLabel(tr("Open with:"));
 
 		$applicationsListBox = new QListWidget;
-		$applications = new QStringList;
+		$applications = array();
 
 		for($i = 1; $i <= 30; ++$i)
-			$applications->append(tr("Application %1").arg($i));
+			$applications[] = tr("Application %1")->arg($i);
 			$applicationsListBox->insertItems(0, $applications);
 
 		$alwaysCheckBox = new QCheckBox;
@@ -117,7 +117,7 @@
 		$layout->addWidget($topLabel);
 		$layout->addWidget($applicationsListBox);
 		$layout->addWidget($alwaysCheckBox);
-		$this->etLayout($layout);
+		$this->setLayout($layout);
 	}
 }
 
@@ -132,7 +132,7 @@
 	 */
 	private $buttonBox;
 	
- 	public function __construct( QString $fileName, QWidget $parent = NULL )
+ 	public function __construct( $fileName, QWidget $parent = NULL )
  	{
  		parent::__construct($parent);
 		$fileInfo = new QFileInfo($fileName);
@@ -146,7 +146,7 @@
                                       | QDialogButtonBox::Cancel);
 
 		$this->connect($this->buttonBox, SIGNAL("accepted()"), $this, SLOT("accept()"));
-		$this->connect($this->buttonBox, SIGNAL("rejected()"), this, SLOT("reject()"));
+		$this->connect($this->buttonBox, SIGNAL("rejected()"), $this, SLOT("reject()"));
 
 		$mainLayout = new QVBoxLayout;
 		$mainLayout->addWidget($this->tabWidget);



More information about the Kde-bindings mailing list