本文整理汇总了PHP中QApplication类的典型用法代码示例。如果您正苦于以下问题:PHP QApplication类的具体用法?PHP QApplication怎么用?PHP QApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QApplication类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testModelView
/**
* 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();
}
开发者ID:0xd34df00d,项目名称:Qross,代码行数:16,代码来源:QtModelViewTestCase.php
示例2: __construct
public function __construct($objParentObject, $strControlId = null)
{
parent::__construct($objParentObject, $strControlId);
$this->strNoun = QApplication::Translate('item');
$this->strNounPlural = QApplication::Translate('items');
$this->prxDatagridSorting = new QControlProxy($this);
}
开发者ID:tomVertuoz,项目名称:framework,代码行数:7,代码来源:QPaginatedControl.class.php
示例3: Form_Run
protected function Form_Run()
{
QApplication::$LoadedPage = 'Home';
if ($_SESSION['User'] == '') {
QApplication::Redirect('index.php');
}
}
开发者ID:sarapsg,项目名称:prayuj,代码行数:7,代码来源:postlogin.php
示例4: Validate
public function Validate()
{
if (!parent::Validate()) {
return false;
}
if ($this->strText != '') {
$dttDateTime = new QDateTime($this->strText);
if ($dttDateTime->IsDateNull()) {
$this->strValidationError = QApplication::Translate("invalid date");
return false;
}
if (!is_null($this->Minimum)) {
if ($dttDateTime->IsEarlierThan($this->Minimum)) {
$this->strValidationError = QApplication::Translate("date is earlier than minimum allowed");
return false;
}
}
if (!is_null($this->Maximum)) {
if ($dttDateTime->IsLaterThan($this->Maximum)) {
$this->strValidationError = QApplication::Translate("date is later than maximum allowed");
return false;
}
}
}
$this->strValidationError = '';
return true;
}
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:27,代码来源:QDatepickerBoxBase.class.php
示例5: GetEndScript
public function GetEndScript()
{
$strToReturn = parent::GetEndScript();
if (QDateTime::$Translate) {
$strShortNameArray = array();
$strLongNameArray = array();
$strDayArray = array();
$dttMonth = new QDateTime('2000-01-01');
for ($intMonth = 1; $intMonth <= 12; $intMonth++) {
$dttMonth->Month = $intMonth;
$strShortNameArray[] = '"' . $dttMonth->ToString('MMM') . '"';
$strLongNameArray[] = '"' . $dttMonth->ToString('MMMM') . '"';
}
$dttDay = new QDateTime('Sunday');
for ($intDay = 1; $intDay <= 7; $intDay++) {
$strDay = $dttDay->ToString('DDD');
$strDay = html_entity_decode($strDay, ENT_COMPAT, QApplication::$EncodingType);
if (function_exists('mb_substr')) {
$strDay = mb_substr($strDay, 0, 2);
} else {
// Attempt to account for multibyte day -- may not work if the third character is multibyte
$strDay = substr($strDay, 0, strlen($strDay) - 1);
}
$strDay = QApplication::HtmlEntities($strDay);
$strDayArray[] = '"' . $strDay . '"';
$dttDay->Day++;
}
$strArrays = sprintf('new Array(new Array(%s), new Array(%s), new Array(%s))', implode(', ', $strLongNameArray), implode(', ', $strShortNameArray), implode(', ', $strDayArray));
$strToReturn .= sprintf('qc.regCAL("%s", "%s", "%s", "%s", %s); ', $this->strControlId, $this->dtxLinkedControl->ControlId, QApplication::Translate('Today'), QApplication::Translate('Cancel'), $strArrays);
} else {
$strToReturn .= sprintf('qc.regCAL("%s", "%s", "%s", "%s", null); ', $this->strControlId, $this->dtxLinkedControl->ControlId, QApplication::Translate('Today'), QApplication::Translate('Cancel'));
}
return $strToReturn;
}
开发者ID:harshanurodh,项目名称:qcodo,代码行数:34,代码来源:QCalendar.class.php
示例6: MakeDirectory
/**
* Same as mkdir but correctly implements directory recursion.
* At its core, it will use the php MKDIR function.
* This method does no special error handling. If you want to use special error handlers,
* be sure to set that up BEFORE calling MakeDirectory.
*
* @param string $strPath actual path of the directoy you want created
* @param integer $intMode optional mode
*
* @return boolean the return flag from mkdir
*/
public static function MakeDirectory($strPath, $intMode = null)
{
if (is_dir($strPath)) {
// Directory Already Exists
return true;
}
// Check to make sure the parent(s) exist, or create if not
if (!self::MakeDirectory(dirname($strPath), $intMode)) {
return false;
}
if (PHP_OS != "Linux") {
// Create the current node/directory, and return its result
$blnReturn = mkdir($strPath);
if ($blnReturn && !is_null($intMode)) {
// Manually CHMOD to $intMode (if applicable)
// mkdir doesn't do it for mac, and this will error on windows
// Therefore, ignore any errors that creep up
QApplication::SetErrorHandler(null);
chmod($strPath, $intMode);
QApplication::RestoreErrorHandler();
}
} else {
$blnReturn = mkdir($strPath, $intMode);
}
return $blnReturn;
}
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:37,代码来源:QFolder.class.php
示例7: btnLogin_Click
protected function btnLogin_Click($strFormId, $strControlId, $strParameter)
{
$objPerson = Person::LoadByUsername(trim(strtolower($this->txtUsername->Text)));
if (!$objPerson) {
$objPerson = Person::LoadByEmail(trim(strtolower($this->txtUsername->Text)));
}
if ($objPerson && $objPerson->IsPasswordValid($this->txtPassword->Text)) {
QApplication::LoginPerson($objPerson);
if ($this->chkRemember->Checked) {
QApplication::SetLoginTicketToCookie($objPerson);
}
// Redirect to the correct location
if ($objPerson->PasswordResetFlag) {
if (array_key_exists('strReferer', $_GET)) {
QApplication::Redirect('/profile/password.php?strReferer=' . urlencode($_GET['strReferer']));
} else {
QApplication::Redirect('/profile/password.php?strReferer=' . urlencode('/'));
}
} else {
if (array_key_exists('strReferer', $_GET)) {
QApplication::Redirect($_GET['strReferer']);
} else {
QApplication::Redirect('/');
}
}
}
// If we're here, either the username and/or password is not valid
$this->txtUsername->Warning = 'Invalid username or password';
$this->txtPassword->Text = null;
// Call Form_Validate() to do that blinking thing
$this->Form_Validate();
}
开发者ID:qcodo,项目名称:qcodo-website,代码行数:32,代码来源:index.php
示例8: Form_Create
protected function Form_Create()
{
// Define our Label
$this->txtBasic = new QTextBox($this);
$this->txtBasic->Name = QApplication::Translate("Basic");
$this->txtBasic = new QTextBox($this);
$this->txtBasic->MaxLength = 5;
$this->txtInt = new QIntegerTextBox($this);
$this->txtInt->Maximum = 10;
$this->txtFlt = new QFloatTextBox($this);
$this->txtList = new QCsvTextBox($this);
$this->txtList->MinItemCount = 2;
$this->txtList->MaxItemCount = 5;
$this->txtEmail = new QEmailTextBox($this);
$this->txtUrl = new QUrlTextBox($this);
$this->txtCustom = new QTextBox($this);
// These parameters are fed into filter_var. See PHP doc on filter_var() for more info.
$this->txtCustom->ValidateFilter = FILTER_VALIDATE_REGEXP;
$this->txtCustom->ValidateFilterOptions = array('options' => array('regexp' => '/^(0x)?[0-9A-F]*$/i'));
// must be a hex decimal, optional leading 0x
$this->txtCustom->LabelForInvalid = 'Hex value required.';
$this->btnValidate = new QButton($this);
$this->btnValidate->Text = "Filter and Validate";
$this->btnValidate->AddAction(new QClickEvent(), new QServerAction());
// just validates
$this->btnValidate->CausesValidation = true;
}
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:27,代码来源:textbox.php
示例9: ParsePostData
public function ParsePostData()
{
// Check to see if this Control's Value was passed in via the POST data
if (array_key_exists($this->strControlId, $_POST)) {
// It was -- update this Control's value with the new value passed in via the POST arguments
if ($this->strText != $_POST[$this->strControlId]) {
//$this->blnModified = true;
}
$this->strText = $_POST[$this->strControlId];
switch ($this->strCrossScripting) {
case QCrossScripting::Allow:
// Do Nothing, allow everything
break;
case QCrossScripting::HtmlEntities:
// Go ahead and perform HtmlEntities on the text
$this->strText = QApplication::HtmlEntities($this->strText);
break;
default:
// Deny the Use of CrossScripts
// Check for cross scripting patterns
// TODO: Change this to RegExp
$strText = strtolower($this->strText);
if (strpos($strText, '<script') !== false || strpos($strText, '<applet') !== false || strpos($strText, '<embed') !== false || strpos($strText, '<style') !== false || strpos($strText, '<link') !== false || strpos($strText, '<body') !== false || strpos($strText, '<iframe') !== false || strpos($strText, 'javascript:') !== false || strpos($strText, ' onfocus=') !== false || strpos($strText, ' onblur=') !== false || strpos($strText, ' onkeydown=') !== false || strpos($strText, ' onkeyup=') !== false || strpos($strText, ' onkeypress=') !== false || strpos($strText, ' onmousedown=') !== false || strpos($strText, ' onmouseup=') !== false || strpos($strText, ' onmouseover=') !== false || strpos($strText, ' onmouseout=') !== false || strpos($strText, ' onmousemove=') !== false || strpos($strText, ' onclick=') !== false || strpos($strText, '<object') !== false || strpos($strText, 'background:url') !== false) {
throw new QCrossScriptingException($this->strControlId);
}
}
}
}
开发者ID:schematical,项目名称:MJax2.0,代码行数:28,代码来源:MJaxTouchTextBox.class.php
示例10: SetupPanel
protected function SetupPanel()
{
if (!$this->objGroup->IsLoginCanView(QApplication::$Login)) {
$this->ReturnTo('/groups/');
}
$this->SetupViewControls(false, false);
$this->dtgMembers->SetDataBinder('dtgMembers_Bind', $this);
$this->txtFirstName = new QTextBox($this);
$this->txtFirstName->Name = 'First Name (Exact)';
$this->txtFirstName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgMembers_Refresh'));
$this->txtFirstName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgMembers_Refresh'));
$this->txtFirstName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->txtLastName = new QTextBox($this);
$this->txtLastName->Name = 'Last Name (Exact)';
$this->txtLastName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgMembers_Refresh'));
$this->txtLastName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgMembers_Refresh'));
$this->txtLastName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->lblQuery = new QLabel($this);
$this->lblQuery->Name = 'Search Parameters';
$this->lblQuery->Text = nl2br(QApplication::HtmlEntities($this->objGroup->SmartGroup->SearchQuery->Description));
$this->lblQuery->HtmlEntities = false;
if ($this->objGroup->CountEmailMessageRoutes()) {
$this->SetupEmailMessageControls();
}
$this->SetupSmsControls();
}
开发者ID:alcf,项目名称:chms,代码行数:26,代码来源:CpGroup_ViewSmartGroup.class.php
示例11: DisplayInProjectListInProgressColumn
public function DisplayInProjectListInProgressColumn(NarroProject $objProject, $strText = '')
{
$strExportText = '';
if ($objProject->ProjectType != NarroProjectType::Mozilla) {
return array($objProject, '');
}
$objCache = new NarroCache(__CLASS__, QApplication::GetLanguageId());
$objData = $objCache->GetData();
if (!$objData) {
$strJson = @file_get_contents($this->strUrl);
if ($strJson) {
$objData = json_decode($strJson);
if ($objData) {
$objCache->SaveData($objData);
}
}
}
if (is_array($objData->items)) {
foreach ($objData->items as $objItem) {
if ($objItem->id == sprintf('%s/%s', $objProject->GetPreferenceValueByName('Code name on mozilla l10n dashboard'), QApplication::$TargetLanguage->LanguageCode)) {
$strWarning = $objItem->warnings ? sprintf('%d warnings', $objItem->warnings) : '';
$strMissing = $objItem->missing ? sprintf('%d missing', $objItem->missing) : '';
$strExportText = sprintf('<a title="Visit the Mozilla l10n dashboard" target="_blank" href="https://l10n-stage-sj.mozilla.org/dashboard/compare?run=%d">%s</a>', $objItem->runid, join(', ', array($objItem->result, $strMissing, $strWarning)));
break;
}
}
}
return array($objProject, $strExportText);
}
开发者ID:Jobava,项目名称:narro,代码行数:29,代码来源:NarroMozillaDashboard.class.php
示例12: SetupChildEditControls
protected function SetupChildEditControls()
{
$this->lstGrowthGroupLocation = $this->mctGrowthGroup->lstGrowthGroupLocation_Create();
$this->lstGrowthGroupStructure = $this->mctGrowthGroup->lstGrowthGroupStructures_Create();
$this->lstGrowthGroupStructure->Rows = 10;
$this->lstGrowthGroupStatus = new QListBox($this);
foreach (AvailabilityStatus::LoadAll() as $objStatus) {
$this->lstGrowthGroupStatus->AddItem($objStatus->Name, $objStatus->Id);
}
$this->lstGrowthGroupDayType = $this->mctGrowthGroup->lstGrowthGroupDayType_Create();
$this->txtStartTime = $this->mctGrowthGroup->txtStartTime_Create();
$this->txtEndTime = $this->mctGrowthGroup->txtEndTime_Create();
$this->txtAddress1 = $this->mctGrowthGroup->txtAddress1_Create();
$this->txtAddress2 = $this->mctGrowthGroup->txtAddress2_Create();
$this->txtCrossStreet1 = $this->mctGrowthGroup->txtCrossStreet1_Create();
$this->txtCrossStreet2 = $this->mctGrowthGroup->txtCrossStreet2_Create();
$this->txtZipCode = $this->mctGrowthGroup->txtZipCode_Create();
$this->txtLongitude = $this->mctGrowthGroup->txtLongitude_Create();
$this->txtLatitude = $this->mctGrowthGroup->txtLatitude_Create();
$this->txtAccuracy = $this->mctGrowthGroup->txtAccuracy_Create();
$this->txtAccuracy->Instructions = 'as reported by Google Maps -- this should ideally be 7';
$this->txtDescription = $this->mctGrowthGroup->txtDescription_Create();
$this->btnRefresh = new QButton($this);
$this->btnRefresh->Text = 'Lookup Using Google Maps';
$this->btnRefresh->AddAction(new QClickEvent(), new QToggleEnableAction($this->btnRefresh));
$this->btnRefresh->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnRefresh_Click'));
$this->cblMeetings = new QCheckBoxList($this, 'days');
$this->cblMeetings->Name = 'Meetings per Month';
foreach (array('1st', '2nd', '3rd', '4th', '5th', 'Every Other') as $intKey => $strName) {
$intValue = pow(2, $intKey);
$this->cblMeetings->AddItem($strName, $intValue, $this->mctGrowthGroup->GrowthGroup->MeetingBitmap & $intValue);
}
QApplication::ExecuteJavaScript('document.getElementById("days[5]").onclick = EveryOtherClicked;');
}
开发者ID:alcf,项目名称:chms,代码行数:34,代码来源:CpGroup_EditGrowthGroup.class.php
示例13: __construct
/**
* Constructor
*
* @param QControl|QForm $objParentObject Parent of this textbox
* @param null|string $strControlId Desired control ID for the textbox
*/
public function __construct($objParentObject, $strControlId = null)
{
parent::__construct($objParentObject, $strControlId);
// borrows too short and too long labels from super class
$this->strLabelForTooShort = QApplication::Translate('Enter at least %s items.');
$this->strLabelForTooLong = QApplication::Translate('Enter no more than %s items.');
}
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:13,代码来源:QCsvTextBox.class.php
示例14: Form_Create
protected function Form_Create()
{
parent::Form_Create();
$this->pnlTab = new QTabs($this);
$pnlDummy = new QPanel($this->pnlTab);
$pnlDummy = new QPanel($this->pnlTab);
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders = array(NarroLink::ProjectList(t('Projects')), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_ALL, '', 0, 0, 10, 0, 0, t('Translate')), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Review')));
/**
* Do not show the langauge tab if only two languages are active (source and target
* Unless the user is an administrator and might want to set another one active
*/
if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
$this->pnlLanguageTab = new QTabs($this->pnlTab);
$pnlDummy = new QPanel($this->pnlLanguageTab);
$arrLangHeaders[] = t('List');
if (QApplication::HasPermissionForThisLang('Can add language')) {
$this->pnlLanguageEdit = new NarroLanguageEditPanel($this->pnlLanguageTab, NarroLanguage::Load(QApplication::QueryString('lid')));
$arrLangHeaders[] = QApplication::QueryString('lid') ? t('Edit') : t('Add');
}
$this->pnlLanguageTab->Headers = $arrLangHeaders;
$this->pnlLanguageTab->Selected = 1;
$arrHeaders[] = t('Languages');
$this->pnlTab->Selected = count($arrHeaders) - 1;
}
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::UserList('', t('Users'));
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::RoleList(0, '', t('Roles'));
if (QApplication::HasPermissionForThisLang('Administrator')) {
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::Log('', t('Application Log'));
}
$this->pnlTab->Headers = $arrHeaders;
}
开发者ID:Jobava,项目名称:narro,代码行数:35,代码来源:language_edit.php
示例15: Form_Create
protected function Form_Create()
{
parent::Form_Create();
$this->pnlTab = new QTabs($this);
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::ProjectList(t('Projects'));
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_TRANSLATED, '', 0, 0, 10, 0, 0, t('Translate'));
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::Review(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Translate'));
if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::LanguageList(t('Languages'));
}
$this->pnlUserList = new NarroUserListPanel($this->pnlTab);
$arrHeaders[] = NarroLink::UserList('', t('Users'));
$this->pnlTab->Selected = count($arrHeaders) - 1;
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::RoleList(0, '', t('Roles'));
if (QApplication::HasPermissionForThisLang('Administrator')) {
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::Log('', t('Application Log'));
}
$this->pnlTab->Headers = $arrHeaders;
}
开发者ID:Jobava,项目名称:narro,代码行数:25,代码来源:users.php
示例16: GetResetButtonHtml
/**
* Creates the reset button html for use with multiple select boxes.
*
*/
protected function GetResetButtonHtml()
{
$strJavaScriptOnClick = sprintf('$j("#%s").val(null);$j("#%s").trigger("change"); return false;', $this->strControlId, $this->strControlId);
$strToReturn = sprintf(' <a id="reset_ctl_%s" href="#" class="listboxReset">%s</a>', $this->strControlId, QApplication::Translate('Reset'));
QApplication::ExecuteJavaScript(sprintf('$j("#reset_ctl_%s").on("%s", function(){ %s });', $this->strControlId, "click", $strJavaScriptOnClick));
return $strToReturn;
}
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:11,代码来源:QListBox.class.php
示例17: Form_Create
protected function Form_Create()
{
parent::Form_Create();
$this->pnlTab = new QTabs($this);
/**
* Create the project list panel and set the filter from the url.
* The filter is used to show only projects of a given status based on their progress
* (finished, empty, in progress).
*/
$this->pnlProjectList = new NarroProjectListPanel($this->pnlTab);
$this->pnlTop = new NarroTopPanel(date(sprintf('Y-m-%d 00:00:00', date('d') - date('N') + 1)), $this);
$pnlDummy = new QPanel($this->pnlTab);
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders = array(t('Projects'), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_TRANSLATED, '', 0, 0, 10, 0, 0, t('Translate')), NarroLink::Review(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Review')));
/**
* Do not show the langauge tab if only two languages are active (source and target
* Unless the user is an administrator and might want to set another one active
*/
if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::LanguageList(t('Languages'));
}
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::UserList('', t('Users'));
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::RoleList(0, '', t('Roles'));
if (QApplication::HasPermissionForThisLang('Administrator')) {
$pnlDummy = new QPanel($this->pnlTab);
$arrHeaders[] = NarroLink::Log('', t('Application Log'));
}
$this->pnlTab->Headers = $arrHeaders;
}
开发者ID:Jobava,项目名称:narro,代码行数:32,代码来源:projects.php
示例18: SaveHeadShot
/**
* Given a Temp File Path, this will save the database record AND copy the file at the temporary file path
* to the file assets directory for headshots
* @param string $strTempFilePath
* @return void
*/
public function SaveHeadShot($strTempFilePath)
{
// Figure out the Image Type
$mixImageInfo = getimagesize($strTempFilePath);
switch ($mixImageInfo['mime']) {
case 'image/gif':
$this->intImageTypeId = ImageType::gif;
break;
case 'image/jpeg':
$this->intImageTypeId = ImageType::jpg;
break;
case 'image/png':
$this->intImageTypeId = ImageType::png;
break;
default:
throw new QCallerException('Image Type Not Supported: ' . $mixImageInfo['mime']);
}
// Start the Transaction
HeadShot::GetDatabase()->TransactionBegin();
// Save the DB Record, Make Folders (if appicable) and Save the File
$this->Save();
QApplication::MakeDirectory($this->Folder, 0777);
copy($strTempFilePath, $this->Path);
chmod($this->Path, 0777);
// Commit the Transaction
HeadShot::GetDatabase()->TransactionCommit();
}
开发者ID:alcf,项目名称:chms,代码行数:33,代码来源:HeadShot.class.php
示例19: GetEndScript
public function GetEndScript()
{
$strJS = parent::GetEndScript();
// Attach the qcubed tracking functions just after parent script attaches the widget to the html object
QApplication::ExecuteJsFunction('qcubed.resizable', $this->GetJqControlId(), $this->ControlId, QJsPriority::High);
return $strJS;
}
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:7,代码来源:QResizableBase.class.php
示例20: __construct
public function __construct()
{
parent::__construct();
$quit = new QPushButton(tr("&Quit"));
$quit->setFont(new QFont("Times", 18, QFont::Bold));
QObject::connect($quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()'));
$angle = new LCDRange();
$angle->setRange(5, 70);
$force = new LCDRange();
$force->setRange(10, 50);
$cannonField = new CannonField();
QObject::connect($angle, SIGNAL('valueChanged(int)'), $cannonField, SLOT('setAngle(int)'));
QObject::connect($cannonField, SIGNAL('angleChanged(int)'), $angle, SLOT('setValue(int)'));
QObject::connect($force, SIGNAL('valueChanged(int)'), $cannonField, SLOT('setForce(int)'));
QObject::connect($cannonField, SIGNAL('forceChanged(int)'), $force, SLOT('setValue(int)'));
$shoot = new QPushButton(tr("&Shoot"));
$shoot->setFont(new QFont("Times", 18, QFont::Bold));
QObject::connect($shoot, SIGNAL('clicked()'), $cannonField, SLOT('shoot()'));
$topLayout = new QHBoxLayout();
$topLayout->addWidget($shoot);
$topLayout->addStretch(1);
$leftLayout = new QVBoxLayout();
$leftLayout->addWidget($angle);
$leftLayout->addWidget($force);
$gridLayout = new QGridLayout();
$gridLayout->addWidget($quit, 0, 0);
$gridLayout->addLayout($topLayout, 0, 1);
$gridLayout->addLayout($leftLayout, 1, 0);
$gridLayout->addWidget($cannonField, 1, 1, 2, 1);
$gridLayout->setColumnStretch(1, 10);
$this->setLayout($gridLayout);
$angle->setValue(60);
$force->setValue(25);
$angle->setFocus();
}
开发者ID:Shadrackn,项目名称:php-qt,代码行数:35,代码来源:main.php
注:本文中的QApplication类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论