c ++ equivalent code starts a QML?
I've been watching this blog here:
http://bbcascadescode.Tumblr.com/post/38998702671/invoke-share-for-BB10
But I don't really know QML so I'm having a time difficult conversion to C++ code cascades. Can someone with this?
This is the part that is stumping me:
actions: [ InvokeActionItem { ActionBar.placement: ActionBarPlacement.OnBar title: "Share" query { mimeType: "text/plain" invokeActionId: "bb.action.SHARE" } onTriggered: { } } ]
This thread here also lists a large number of QML based sharing of code, but I'm looking for C++.
What I would like to have the code in my crack method.
Page addAction method to add instances of InvokeActionItem.
InvokeQuery *query = InvokeQuery::create() .mimeType("text/plain") .invokeActionId("bb.action.SHARE"); QString data = QString::fromUtf8("some localized data"); query->setData(data.toUtf8()); InvokeActionItem *actionItem = InvokeActionItem::create(query) .title("Share"); addAction(actionItem, ActionBarPlacement::OnBar); QObject::connect(actionItem, SIGNAL(triggered()), this, SLOT(share_triggered()));
Tags: BlackBerry Developers
Similar Questions
-
is there any equivalent code for this?
Hi, I am doing a project on steganography, but I'm stuck on the bitmap byte array conversion.
There is no problem for the code to run in the desktop. Is there an equivalent code for the following code in BlackBerry JDE (for OS 5)?
Private byte [] imageToByte (BufferedImage img)
{
WritableRaster raster = img.getRaster ();
DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer ();
Return buffer.getData ();
}Review Bitmap getARGB (...) method.
Here are some examples of documentation of Bitmap code form:
Original image bitmap =...
int [] argb = new int [original.getWidth () * () original.getHeight];
original.getARGB (argb, original.getWidth (), 0, 0, 0, original.getWidth (), original.getHeight ()); -
Python - SyntaxError: Non-UTF-8 Code starting with "\x9f".
Hello
I get the following error message when you start my Qt on my Playbook applications:
File "app/python/example02", line 1
SyntaxError: Non-UTF-8 code starting with "\x9f" in the folder app/python/example02 on line 2, but no encoding declared; See http://python.org/dev/peps/pep-0263/ for more detailsI use the bbndk - 2.1.0 - beta1 and Qt 4.8.3 of http://qt-project.org/wiki/Building-Qt4-for-Blackberry. BlackBerry Playbook version is 2.1.0.1032. Host computer is running Ojuba Linux (Fedora 16 clone with non - pae kernel), Python version 2.7.3.
Best regards
Okay, so now the question becomes "what the heck are you doing?" :-)
This isn't a Python file... it is a binary native to the ELF format. Should probably be under app/native/example02 instead.
Why Python even involved here? You try to group together a version from the Python runtime with your app? Somehow the "blackberry pythonpackager" instead of "blackberry nativepackager" did you use to generate the .bar file? Here, something is very strange...
-
Convert ASCII characters in hexadecimal equivalent code
Hello
I'm trying to convert special ascii characters that are read from a serial port, a type of data that I can handle. To create this scenario, create an empty string constant, then make a right click on it and change the type of "Hex". Now, enter a value in this document, said 287F. If you right-click again and change the "Normal" view, you should see this value "(", which are special ascii characters."
What I'm trying to do is to convert the incoming data in a format where I can manipulate the data to read the binary equivalent of these data. For example, for incoming data of '287F', I want to be able to convert "0010 1000 0111 1111".
I was not able to find any function that would transform this data type. I forget something that is very obvious? Or is it not possible to do in Labview. Please notify.
Thanks in advance.
ShOAB
If it is always exactly 2 bytes, catalogued at U16 and a format string as a binary file or set the display of the U16 in binary format.
-
Hey guys.
I have something akward going with my vi.
I have this game I created it, and everything runs inside a while loop that ends on a button click.
In any case, I did a hardware node 'FP. OPEN"and gave him a constant fake so that whenever the while loop ends he will close the current VI (since this vi is basiclly a sub - vi is called from another vi, and I don't want to see once I'm done with my code).
For some reason, I saw the window instantly blocking down, so I decided to test it and replaced it with a msgbox instead.
To my surprise, the msgbox appeared immediately (remember, the msgbox is at the end of the code)
Could anyone understand this?
Thank you very much!
* a link to my VI for reference:
https://www.dropbox.com/s/n5k3faaf9vkb80i/special.VI?DL=0
Your loop is not inside the structure of the sequence, but floating on it (do a cleaning of the diagram to see). This means the close FP occurs as soon as the second image is entered. (even if the while loop were part of the frame, the fp fence would go at the same time and always close the FP immediately.) You should at least, place it in the last (now empty) image.)
As long as a notice, please consider the program from scratch as a restructuring state machine. No local variables or structures of sequence are needed. Once you consolidate all the duplication of code, all diagam would be probably good on a postcard.
-
Is redemption code starts membeship time now or after the accession period curent?
I bought the redemtion code forcreative cloud, but it is my subscription until end of may, I now use (and 1.5 year membership) or having to wait until the end of this plan and just then use a code?
Thanks for help
Please contact the account/payment via account-payment-order-support medium
-
Code equivalent oracle for str
Hi friends,
I want the Oracle equivalent code for the following SQL code,
Please someone help me.select str('534', 14, 3);
Thank you
RAMYou can use to_char
The syntax of the function to_char is:
TO_CHAR (value, [format_mask], [nls_language])
TO_CHAR (1210.73, '9999.9') returns "1210.7".
TO_CHAR (1210.73, ' 9 999,99') returns "1,210.73".
TO_CHAR (1210.73, '$9 999.00') would return "$1 210,73". "
TO_CHAR (21, ' 000099 ") would return '000021' -
C++ or integration of QML calendar event creation
Hello
I am currently trying to add calendar event creation integration in my application.
I started using QML create here
actions: [ ActionItem { title: qsTr("Add To Calendar") imageSource: "asset:///IMG/ic_add_entry.png" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { invokeCalendar.trigger("bb.action.CREATE") } } ] attachedObjects: [ Invocation { id: invokeCalendar query { //According to BlackBerry, this doesn't work so I need to find a workaround mimeType: "text/calendar" invokeActionId: "bb.action.CREATE" invokeTargetId: "sys.pim.calendar.viewer.eventcreate" } } ]
After the application of the above code, I discovered that nothing happened when the actionitem was activated; so, I asked him it with BlackBerry and it turns out that they couldn't make it work either.
So, last week I tried various methods on how to integrate calendar functionality in my application. I tried the examples here and here , but could not get either to work due to several errors.
Ideally, I would like to be able to define the: subject, body and the hour of beginning, all QML, but after searching the calendar I don't think I can.
import bb.cascades 1.0 Page { property alias fixtureInfo: fixtureText.text property alias dateInfo: dateText.text property alias timeInfo: timeText.text property alias timeZone: timeZoneText.text property alias stadiumInfo: stadiumText.text titleBar: TitleBar { // Localized text with the dynamic translation and locale updates support title: qsTr("Fixture") + Retranslate.onLocaleOrLanguageChanged scrollBehavior: TitleBarScrollBehavior.Sticky } ScrollView { id: scrollView scrollViewProperties { scrollMode: ScrollMode.Vertical pinchToZoomEnabled: true } Container { id: mainContainer Header { title: qsTr("Teams Playing") } Container { leftPadding: 20 rightPadding: 20 Label { id: fixtureText multiline: true textStyle.base: bodyStyle.style } } Divider { } Header { title: qsTr("Date") } Container { leftPadding: 20 rightPadding: 20 Label { id: dateText multiline: true textStyle.base: bodyStyle.style } } Divider { } Header { title: qsTr("Time (GMT - 3)") } Container { leftPadding: 20 rightPadding: 20 Label { id: timeText multiline: true textStyle.base: bodyStyle.style } } Divider { } Header { title: qsTr("Time (My Timezone)") } Container { leftPadding: 20 rightPadding: 20 Label { id: timeZoneText multiline: true textStyle.base: bodyStyle.style } } Divider { } Header { title: qsTr("Stadium") } Container { leftPadding: 20 rightPadding: 20 Label { id: stadiumText multiline: true textStyle.base: bodyStyle.style } } Divider { } attachedObjects: [ TextStyleDefinition { id: bodyStyle base: SystemDefaults.TextStyles.BodyText } ] } } actions: [ ActionItem { title: qsTr("Add To Calendar") imageSource: "asset:///IMG/ic_add_entry.png" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { invokeCalendar.trigger("bb.action.CREATE") } }, ActionItem { title: qsTr("Share") imageSource: "asset:///IMG/ic_share.png" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { shareAction.trigger("bb.action.SHARE") } }, ActionItem { title: qsTr("Search For Live Score") imageSource: "asset:///IMG/ic_search.png" ActionBar.placement: ActionBarPlacement.InOverflow onTriggered: { var searchpage = goToSearch.createObject(); navigationPane1.push(searchpage); searchpage.searchText("live score for " + fixtureText.text) } } ] attachedObjects: [ ComponentDefinition { id: goToSearch source: "webView.qml" }, Invocation { id: invokeCalendar query { mimeType: "text/calendar" invokeActionId: "bb.action.CREATE" invokeTargetId: "sys.pim.calendar.viewer.eventcreate" } }, Invocation { id: shareAction query.mimeType: "text/plain" query.invokeActionId: "bb.action.SHARE" query.data: fixtureText.text + qsTr(" at ") + timeText.text + qsTr(", ") + timeZoneText.text + qsTr(" in my time zone,") + qsTr(" on ") + dateText.text + qsTr(" in the ") + stadiumText.text + " via @TundraCore #WorldCup2014" query.onQueryChanged: { query.updateQuery() } } ] }
As you can see I'm using aliases, in the above code and so I want to put the following text:
-Set the title of the event: "World Cup 2014:"+ fixtureText.text ".
-Define the body as: fixtureText.text + 'to' + timeZoneText.text + 'on' + dateText.text + "in the" + stadiumText.text
-Set the release date: dateText.text
-Set as start time: timeZoneText.textTherefore, I was wondering if someone would be able to show me how to do this in QML or C++?
Thanks in advance
With the help of two other developers, I managed to get this working through QML my hpp file settings
-
QML no compilation errors, but a run-time error, how to debug?
Code QML without compiling error, but not show debug in C++ code show that qml-> hasErrors() took, but the I don't know what error cause of line. any ideas? I am looking for debug QML, but it seems only break in javascript, don't create not procedure.
Momentics you need to open a "QNX Outlook Information System" [window-> open point of view]
Right-click on the target and select "start SSH session".
In this SSH session, after logging in, type ' slog2info w | grep ' 9000' '
Look for a message on the QML problem.
-
I have a computer laptop r500 and its give me this model flashing - 00010010 every time I connect it.
It does not and no other light either, just the orange flashing light DC/plug light flashes. Infact, it continues to Flash even after I disconnect it. I have to take the battery out to stop the blinking.
I search on the internet and only found this:
-Instructions-
If the power supply microprocessor detects a malfunction, DC IN
icon
flashes orange. The boss of blinking indicates an error as shown below.Start off for 2 seconds
Error code (8 bits)
'1' on a second
'0' on the second half
Interval between the Off in the second half data bits
The error code starts with the least significant digit.Convert the model of blink DC icon in the error code IN hexadecimal
and compare it to the tables below.MS IN
Error code meaning
01 h AC adapter / CC output voltage is more 16.5V (15V + 10%).
02 h improved output voltage Port Replicator III is on 16.5V
(15V + 10%).
04 h AC current output adapter is more 3.96 A (3.6A+10%).Battery
Error code meaning
10 h main battery voltage is more than 13.86V (12.6V+10%) or
BATOV1 signal is detected.
11 the current main battery's 3.96 A (3.6A+10%).
12: 00 current password the main battery when the AC adapter is
connected.
13: 00 current flows to the battery when the AC adapter
is not connected.
14: 00 second battery voltage is more than 13.86V (12.6V+10%) or
BATOV2 signal is detected.
15: 00 second battery charge current is more 3.96 A (3.6A+10%).
16: 00 current flows from the second battery when the AC adapter
is connected.
17: 00 current flows to the second battery when the AC
card is not connected.So, how can I fix this problem now? Can someone please help?
Thank you.
Hello
Which is really strange, buddy.
Have you tried to remove the battery and the AC adapter? Then wait an hour and after that connect the two devices again and try to start the laptop.If it doesn t work I think you need professional help from a service provider allowed. It seems to be a hardware malfunction, and this must be checked by a technician from Notepad to determine the cause of this problem.
If you n t know where to find the nearest ASP, you can search on the Toshiba site for her:
http://EU.computers.Toshiba-Europe.com > support & downloads > find an authorized service providerGood luck!
-
Tecra 9000 - LED flashes and cannot start
I recently got an old laptop Tecra 9000. Unfortunately, it doesn't have a HARD drive (it was taken and sacked by the former owner).
I bought some hard drives that I thought should work in this machine, but all that seems to happen is that the power light blinks 7 times, pauses, then flashes once (and then repeat this.
I guess it's an error code any.
Readers, I've tried are a MK4025GAS and a MK4026GAX. The result is the same on both.
Can we say what means this error, or even tell me the part number of a disk that is compatible with this machine?
Thank you very much.
Hi Guy
One question; have you tried to power the laptop without inserting the HARD drive?
Usually if the laptop is ok, it should be possible to boot the laptop. Of course the laptop will not load the Windows operating system because the HARD drive is missing but it should be able to start and the led must Flash not!But if it flashes, it means that the fault was detected on the motherboard and the LED lamp sends a blink code.
Short blinking means 0 and 1 long flashing
Error code starts with LSB (least significant bit)
for example:
0000 0001-> 1000 0000This code you need to turn it into hex and you will get the error code.
But in my opinion, no one will give you an answer what it means.
Each laptop clean error code series offer... -
communication of the PSC-1804 by PSC-2220 blocking code RT
I'm trying to communicate to a PSC-HAVE-100 on a PSC-1804 through a PSC-2220. I got it for several months with many updates/revisions of the labor code and then the PVD code start correctly (code falls down during the first iteration and cfp-2220 flashes an orange status light). I followed the cause up to the FP Read VI to the PSC HAVE 100. The code crashes even with a simple reading of FP in a while loop (I posted a snip it code), other modules of read/write without problem. If I run the code without the 1804 connected to the network, the code runs without problem. I tried several different 1804 s, 2220, modules of I, paraphernalia of ethernet, host PC, versions of code, backplanes, etc, software versions. I tried to go back to previous versions of my code, but even those who no longer work. I am at a loss.
Current software/firmware
firmware of 1804 - 6.05 (I also tried 6.08 I found the link in a forum, why is it not on the download page of NOR?)
2220 software - Fieldpoint 6.09 - August 2011
LabVIEW 2011
Windows 7 Enterpirse
I work with Drew and thought I would give some info in case anyone else has this problem. What we found was that somehow, the configuration of the controller became out of sync compared to what we had in the project. In general, use us ftp to put the new version of the controller (PSC-2220). If the configuration of e/s in the project has not changed this works very well. However, if you add / remove a module or change the channel names, you will need to re - deploy the project e/s settings. I think the other thing that can ruin is if you open MAX for troubleshooting & auto discover material. It uses the default channel names, then it asks you to save when you exit & default settings are downloaded to the controller. The controller will then poorly synchronized with your project, and in our case, we found that our exe just wouldn't (except if you are disconnected the 1804 that had the wrong settings). We also found that you can solve this problem by using the ".iak" file that is created by the project, open it in MAX and save/download the parameters to the controller. I hope this helps!
-
15 - P03nr: System disabled code forgotten password BIOS on a HP 15-P030nr
System off after start the pwd BIOS 3 times
[321C40EB] can you help me to remove this?
Hello
If your machine is producing a hex code halt, this would indicate that it is a newer bios FRIEND, in this case, you have only two options for the moment.
1. contact HP and see if they can help with an unlock code - start here.
2. it would seem that the hash is not stored in NVRAM and that remove the cmos cell, hold down the power button for a minute, then leave it for a few hours before reassembling actually clears the password - the bad news if you want to try it is that the cell is on the wrong side of the system board - see Page 127 of your & Maintenance Guide.
Kind regards
DP - K
-
software unknown error (0x00000d) exception when you try to start olympus master 2 prog
When you try to start olypus master 2 has got the message "the exception unknown exception soft ware (0x00000d) occurred in the application at location 0x01ooo94818.
I also looked in the management of the comp & found the following:
Log name: Application
Source: Application error
Date: 2010-08-26 10:43:37
Event ID: 1000
Task category: (100)
Level: error
Keywords: Classic
User: n/a
Computer: Admin-PC
Description:
Failing application OLYMPUS Master.exe, version 2.3.0.2, time stamp 0x4b0d15c5, failed module ntdll.dll, version 6.0.6002.18005, time stamp 0x49e03824, exception 0xc015000f, offset error 0x0005b80a, process 0xd2c id code, start the application time 0x01cb450320f41867.
The event XML:
1000
2
100
0 x 80000000000000
53267
Application
Admin-PC
OLYMPUS Master.exe
2.3.0.2
4b0d15c5
ntdll.dll
6.0.6002.18005
49e03824
c015000f
0005b80a
D2C
01cb450320f41867
Am not a comp expert so any ideas on how I can get this prog to start over?
Tried to put in orig cd but even occurs.
Thank you
Hambman
Hi Hamman1,
1. were you able to open this application as soon as possible?
Step 1
Check the hard drive for bad sectors.
http://Windows.Microsoft.com/en-us/Windows-Vista/check-your-hard-disk-for-errorsStep 2
If the problem occurs, you might uninstall and reinstall the application to a different location.
http://Windows.Microsoft.com/en-us/Windows-Vista/uninstall-or-change-a-programBindu R - Microsoft technical support.
-
Is it possible to include a qml file in another file?
Hello
I am creating a list as an example of stamp,
However, all these QML files fall within a records
what I'm trying to do is to create various QML files, and some of these files are shared within other files.
for example: I break the code of stampcollectorapp qml,.
// Second level item see the component in StampItem.qml. ListItemComponent { type: "item" StampItem { } }
The line to [StampItem] looking for another QML file,
If I define StampItem in other current folder, how to write and thank you?
// Second level item see the component in StampItem.qml. ListItemComponent { type: "item" myqmlpath???/StampItem { } }
I think that you must import them into the upper part of your qml, cites the example of application a qml files in subfolders
See here:
https://github.com/BlackBerry/Cascades-samples/BLOB/master/quotes/assets/main.QML
EditScreen is imported in main.qml, and EditScreen is in assets/EditScreen/EditScreen.qml
I don't know if the name of the folder is the same as the qml file name is a convention, then I would try to mess around and see what works.
Maybe you are looking for
-
Question on the keys Fn on Satellite 1955-S805
I work as a COMPUTER consultant and a few days brought portable Satellite 1955-S805.The Client said, the screen is very dark. After a diagnosis, I found, that some wrong with Fn keys - it is not a job, as expected. When I am pressing Fn + F6 or Fn +
-
code error 80070490 cannot get rid to ensure my security updates will be down?
error code 80070490
-
Sync blackBerry Smartphone email with my computer
When I click on delete (X) on my handheld and I select "on mailbox & Handheld ' why it doesn't delete on my PC and Vice Versa?
-
Colors change when art PS is put in IT?
I created a few original art in PS (to be exact, I have 6 PSE) and imported in HAVE (CC 2015), using the basic brushes and swatches. I pulled the colors from the color chart of shades of Web of PSE.But looking at the art now in artificial intelligen
-
How can I insert a row with columns on drive XI
I already checked help and I never gave no opportunity to select or modify a table.CNTRL-BACK does not work either