This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dialogs and notifications projects added
- Loading branch information
Showing
34 changed files
with
1,588 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>dialogs</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<arguments> | ||
<dictionary> | ||
<key>?name?</key> | ||
<value></value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.append_environment</key> | ||
<value>true</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key> | ||
<value>Device-Debug</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.buildArguments</key> | ||
<value></value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.buildCommand</key> | ||
<value>make</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key> | ||
<value>clean</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.contents</key> | ||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key> | ||
<value>true</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key> | ||
<value>true</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.enableFullBuild</key> | ||
<value>true</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key> | ||
<value>Device-Debug</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.stopOnError</key> | ||
<value>true</value> | ||
</dictionary> | ||
<dictionary> | ||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key> | ||
<value>true</value> | ||
</dictionary> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.rim.tad.tools.qml.core.qmlFileBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature> | ||
<nature>org.eclipse.cdt.core.ccnature</nature> | ||
<nature>com.rim.tad.tools.qml.core.qmlNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
eclipse.preferences.version=1 | ||
environment/project/com.qnx.qcc.toolChain.1756592850/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.1756592850/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.1756592850/CPULIST/value=x86 | ||
environment/project/com.qnx.qcc.toolChain.1756592850/VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.1756592850/VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.1756592850/VARIANTLIST/value=g | ||
environment/project/com.qnx.qcc.toolChain.1756592850/append=true | ||
environment/project/com.qnx.qcc.toolChain.1756592850/appendContributed=true | ||
environment/project/com.qnx.qcc.toolChain.533668058/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.533668058/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.533668058/CPULIST/value=arm | ||
environment/project/com.qnx.qcc.toolChain.533668058/EXCLUDE_VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.533668058/EXCLUDE_VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.533668058/EXCLUDE_VARIANTLIST/value=r | ||
environment/project/com.qnx.qcc.toolChain.533668058/append=true | ||
environment/project/com.qnx.qcc.toolChain.533668058/appendContributed=true | ||
environment/project/com.qnx.qcc.toolChain.590190142/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.590190142/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.590190142/CPULIST/value=arm | ||
environment/project/com.qnx.qcc.toolChain.590190142/VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.590190142/VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.590190142/VARIANTLIST/value=g | ||
environment/project/com.qnx.qcc.toolChain.590190142/append=true | ||
environment/project/com.qnx.qcc.toolChain.590190142/appendContributed=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
QMAKE_TARGET = dialogs | ||
QMAKE = $(QNX_HOST)/usr/bin/qmake | ||
TARGET = $(QMAKE_TARGET) | ||
|
||
|
||
all: Makefile $(QMAKE_TARGET) | ||
|
||
clean: | ||
$(MAKE) -C ./arm -f Makefile sureclean | ||
$(MAKE) -C ./x86 -f Makefile sureclean | ||
|
||
|
||
Makefile: FORCE | ||
$(QMAKE) -spec unsupported/blackberry-armv7le-g++ -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device | ||
$(QMAKE) -spec unsupported/blackberry-x86-g++ -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator | ||
$(MAKE) -C ./translations -f Makefile update release | ||
|
||
FORCE: | ||
|
||
$(QMAKE_TARGET): device simulator | ||
|
||
device: | ||
$(MAKE) -C ./arm -f Makefile all | ||
|
||
Device-Debug: Makefile | ||
$(MAKE) -C ./arm -f Makefile debug | ||
|
||
Device-Release: Makefile | ||
$(MAKE) -C ./arm -f Makefile release | ||
|
||
simulator: | ||
$(MAKE) -C ./x86 -f Makefile all | ||
|
||
Simulator-Debug: Makefile | ||
$(MAKE) -C ./x86 -f Makefile debug |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
/* Copyright (c) 2012 Research In Motion Limited. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import bb.cascades 1.0 | ||
import bb.system 1.0 | ||
|
||
Page { | ||
//! [0] | ||
attachedObjects: [ | ||
SystemToast { | ||
id: toast | ||
body: qsTr("Toast body") | ||
icon: "asset:///images/Battery-low.png" | ||
onFinished: { | ||
if (result == SystemUiResult.ConfirmButtonSelection) { | ||
console.log("confirm"); | ||
} else if (result == SystemUiResult.CancelButtonSelection) { | ||
console.log("cancel"); | ||
} else if (result == SystemUiResult.TimeOut) { | ||
console.log("timeout"); | ||
} | ||
} | ||
}, | ||
SystemPrompt { | ||
id: prompt | ||
title: qsTr("PROMPT") | ||
modality: SystemUiModality.Application | ||
inputField.inputMode: SystemUiInputMode.Password | ||
confirmButton.label: qsTr("Okay button") | ||
confirmButton.enabled: true | ||
cancelButton.label: qsTr("Cancel button") | ||
cancelButton.enabled: true | ||
onFinished: { | ||
if (result == SystemUiResult.ConfirmButtonSelection) { | ||
console.log("confirm"); | ||
} else if (result == SystemUiResult.CancelButtonSelection) { | ||
console.log("cancel"); | ||
} | ||
} | ||
}, | ||
SystemCredentialsPrompt { | ||
id: credentialsPrompt | ||
modality: SystemUiModality.Global | ||
title: qsTr("CREDENTIALS PROMPT") | ||
body: qsTr("Credentials dialog body") | ||
includeShowPassword: true | ||
includeRememberMe: true | ||
confirmButton.label: qsTr("Login button") | ||
confirmButton.enabled: true | ||
cancelButton.label: qsTr("Cancel button") | ||
cancelButton.enabled: true | ||
onFinished: { | ||
if (result == SystemUiResult.ConfirmButtonSelection) { | ||
console.log("confirm"); | ||
} else if (result == SystemUiResult.CancelButtonSelection) { | ||
console.log("cancel"); | ||
} | ||
} | ||
}, | ||
SystemDialog { | ||
id: dialog | ||
title: qsTr("DIALOG") | ||
body: qsTr("Dialog body") | ||
confirmButton.label: qsTr("Okay button") | ||
confirmButton.enabled: true | ||
cancelButton.label: qsTr("Cancel button") | ||
cancelButton.enabled: true | ||
buttons: [ | ||
SystemUiButton { | ||
id: random | ||
label: qsTr("RANDOM") | ||
enabled: true | ||
}, | ||
SystemUiButton { | ||
id: random2 | ||
label: qsTr("RANDOM2") | ||
enabled: true | ||
} | ||
] | ||
onFinished: { | ||
var x = result; | ||
console.log(dialog.error); | ||
if (x == SystemUiResult.ConfirmButtonSelection) { | ||
console.log("confirm"); | ||
} else if (x == SystemUiResult.CancelButtonSelection) { | ||
console.log("cancel"); | ||
} else if (x == SystemUiResult.ButtonSelection) { | ||
console.log("button"); | ||
} else if (x == SystemUiResult.None) { | ||
console.log("none"); | ||
} else if (x == SystemUiResult.Error) { | ||
console.log("error"); | ||
} else if (x == SystemUiResult.TimeOut) { | ||
console.log("timeout"); | ||
} else { | ||
console.log(x); | ||
} | ||
} | ||
} | ||
|
||
] | ||
//! [0] | ||
|
||
Container { | ||
layout: DockLayout {} | ||
|
||
ImageView { | ||
horizontalAlignment: HorizontalAlignment.Fill | ||
verticalAlignment: VerticalAlignment.Fill | ||
|
||
imageSource: "asset:///images/background.png" | ||
} | ||
|
||
Container { | ||
horizontalAlignment: HorizontalAlignment.Fill | ||
verticalAlignment: VerticalAlignment.Center | ||
|
||
leftPadding: 20 | ||
topPadding: 20 | ||
rightPadding: 20 | ||
bottomPadding: 20 | ||
|
||
Label { | ||
horizontalAlignment: HorizontalAlignment.Center | ||
|
||
text: qsTr("Dialog Demo") | ||
textStyle.base: SystemDefaults.TextStyles.BigText | ||
textStyle.color: Color.White | ||
} | ||
|
||
TextField { | ||
topMargin: 100 | ||
|
||
hintText: qsTr("Enter text of dialog") | ||
} | ||
|
||
RadioGroup { | ||
id: group | ||
|
||
topMargin: 20 | ||
|
||
Option { | ||
id: option1; | ||
text: qsTr("Toast"); | ||
value: toast | ||
selected: true | ||
} | ||
|
||
Option { | ||
id: option2; | ||
text: qsTr("Prompt") | ||
value: prompt | ||
} | ||
|
||
Option { | ||
id: option3; | ||
text: qsTr("Credentials Prompt") | ||
value: credentialsPrompt | ||
} | ||
|
||
Option { | ||
id: option4; | ||
text: qsTr("Dialog") | ||
value: dialog | ||
} | ||
} | ||
|
||
Container { | ||
layout: StackLayout { | ||
orientation: LayoutOrientation.LeftToRight | ||
} | ||
|
||
topMargin: 40 | ||
|
||
//! [1] | ||
Button { | ||
id: show | ||
text: qsTr("Show") | ||
onClicked: group.selectedValue.show() | ||
} | ||
//! [1] | ||
|
||
//! [2] | ||
Button { | ||
id: cancel | ||
text: qsTr("Cancel") | ||
onClicked: group.selectedValue.cancel() | ||
} | ||
//! [2] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.