get a custom by a GroupDataModel object

Hey gang,

I have a GroupDataModel that I fill like this:

m_model->insert(new Task(lineList.at(3), lineList.at(0), 11223344, lineList.at(2), true));

in a loop.  There will be several objects "Task" in the GroupDataModel.

What I am not clear is how to get a specific "task" out of the GroupDataModel.

I tried to use toListOfObjects(), but I don't know how to use it.

I can't find good examples, although there is some for toGroupOfMaps().

anyone able to help?

THX,

J

Try this

toListOfMaps

QList list = m_model->toListOfMaps();

foreach(QVariantMap item, list){
    // here is logic for compare/find the item by the any value
    if (item["your key"] == your condition){
        //here is your find item
    }
}

Even logic, you can use toListOfObjects, but instead of QVariantMap use your task object.

QList list = m_model->toListOfObjects();

foreach(Task *item, list){
    // here is logic for compare/find the item by the any value
    if (item->youkey == your condition){
        //here is your find item
    }
}

May be a better solution, but hope this works will

Tags: BlackBerry Developers

Similar Questions

  • Get the custom object Id 5 in URL

    Hello

    How can I get an Id value of 5 custom in a URL object?

    I get 5 name of the custom object using the % name CustomObject5%, but does not work with the % CustomObject5 Id %.

    My code is:

    & ServiceRequestEditForm.CustomObject5 name = % CustomObject5 name %.
    & ServiceRequestEditForm.CustomObject5 Id = % CustomObject5 Id %.

    Customize objects 1 and 2 works fine with:

    & ServiceRequestEditForm.Custom 1 = object name % 1 object name custom percent.
    & ServiceRequestEditForm.Custom object Id = 1% Custom object Id 1%.
    & ServiceRequestEditForm.Custom 2 = object name % name object custom 2%.
    & ServiceRequestEditForm.Custom object Id = 2% object Id custom 2%.

    Thank you.

    Published by: user13796387 on 03/15/2011 06:59

    Published by: user13796387 on 03/15/2011 07:38

    Published by: user13796387 on 03/15/2011 07:39

    Yes. Name, Id and Id integration external fields are available in the lay of the land. ID is not available.

    .

  • Expansion of the custom brushes creates several objects

    Hi guys,.

    I'm working on an illustration and I used brushes custom, I did to expose the sketch, but I notice that when I develop the paths, each line gets divided into a bunch of objects as shown in the screenshot below.

    It seems to be slowing down the program massively and is also very convenient for storing the line drawings. Is this something to do with the brush settings? Is there a way to solve this problem, so each brushtroke is just an object?

    Thanks for your help!

    Screen Shot 2016-08-21 at 21.49.48.png

    What do you see if you drag your custom brush from the brushes to the artboard Panel and watch mode plotted?

  • How to get the external Bitmap of URL object

    Hi all!

    I'm a developer starting with components of BlackBerry, I try to get a Bitmap of the outer object
    URL, but my getImage method does not work correctly. I think that the problem lies in the getImage method. just at the moment where I try to
    create form of Bitmap bytes. Note: J2me with the Image object, that it works!

    could someone help me please?

    Sorry for my bad English & thank you for helping me!

    Code:

    SerializableAttribute public class MainForm extends form {}

    private String url = "http://user-xxxx/json.js";
    private String [] imageURLs = new String [5];

    public MainForm() {}

    try {}
    getJSON (url);
    } catch (IOException e) {}
    e.printStackTrace ();
    }

    try {}
    Add (GetImage(this.imageURLs[0]));
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }

    Public Sub getJSON (String url) throws IOException {}
    StringBuffer sb = new StringBuffer();
    InputStream is = null;
    HttpConnection hc = null;
    try {}
    long bytesLength = 0;
    int ch = 0;
    HC = (HttpConnection), Connector.open (url);
    is = hc.openInputStream ();
    bytesLength = hc.getLength ();
    If (bytesLength! = - 1) {}
    for (int i = 0; i)< byteslength;="" i++)="">
    If ((ch = is.read (())! = - 1) {}
    SB. Append ((Char) ch);
    }
    }
    } else {}
    While ((ch = is.read (())! = - 1) {}
    bytesLength = is.available ();
    SB. Append ((Char) ch);
    }
    }
    parseJSON (sb.toString ());
    } {Finally
    is. Close();
    HC. Close();
    }
    }

    {} public void parseJSON (String sb)
    try {}
    JSONObject jo = new JSONObject (sb);
    If (jo! = null) {}
    JSONObject channel = jo.getJSONObject ("channel");
    If (channel! = null) {}
    JSONArray points = channel.getJSONArray("item");
    If (items! = null) {}
    for (int i = 0; i)< items.length();="" i++)="">
    JSONObject point = items.getJSONObject (i);
    this.imageURLs [i] = item.getString ("image");
    }
    }
    }
    }
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }

    I think that the problem lies in this method.

    public BitmapField getImage (String url) throws Exception {}
    InputStream inputStream = Connector.openInputStream (url) (InputStream);
    Bitmap image = null;
    BitmapField bf = null;
    try {}
    ByteArrayOutputStream Baos = new ByteArrayOutputStream();
    int ch;
    While ((ch = inputStream.read ())! = - 1) {}
    Baos.Write (ch);
    }
    Byte [] imageData = baos.toByteArray ();
    Image = Bitmap.createBitmapFromBytes (imageData, 0, imageData.length, 1);
    BF = new BitmapField (image);
    } {Finally
    If (inputStream! = null)
    inputStream.close ();
    }
    return (bf == null? null: bf);
    }

    public String [] getImageURLs() {}
    Return this.imageURLs;
    }

    }

    Finally my fatal mistake was in archive JSON, I change the URL of the images of http://localhost/image.jpg to
    http://user-xxx/image.jpg (MDS - CS available in http://localhost URL: 8080 /), and now it works!

    Ted and arkadyz, your suggestions have been very helpful for me, thank you very much!

    Final code:

    Class MainMIDlet

    Import net.rim.device.api.ui.UiApplication;

    SerializableAttribute public class MainMIDlet extends UiApplication {}

    public MainMIDlet() {}
    MainForm mf = new MainForm();
    pushScreen (mf);
    }

    Public Shared Sub main (String [] args) {}
    MainMIDlet mm = new MainMIDlet();
    mm.enterEventDispatcher ();
    }
    }

    Class MainForm

    import java.io.ByteArrayOutputStream.
    import java.io.IOException;
    import java.io.InputStream;

    Import javax.microedition.io.Connector;
    Import javax.microedition.io.HttpConnection;

    Import org.json.me.JSONArray;
    Import org.json.me.JSONObject;

    Import net.rim.device.api.system.EncodedImage;
    Import net.rim.device.api.ui.component.BitmapField;
    Import net.rim.device.api.ui.component.LabelField;
    Import net.rim.device.api.ui.container.MainScreen;

    SerializableAttribute public class MainForm extends form {}

    private String url = "http://user-xxx/json.js";
    private String [] jsonTitles = new String [5];
    private String [] jsonImages = new String [5];
    private LabelField lf = null;
    private BitmapField bf = null;

    public MainForm() {}

    try {}
    getJSON (url);
    } catch (IOException e) {}
    e.printStackTrace ();
    }

    LF = getLabelField(this.jsonTitles[0]);
    Add (LF);

    try {}
    BF = getBitmapField(this.jsonImages[0]);
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    Add (BF);

    }

    Public Sub getJSON (String url) throws IOException {}
    StringBuffer sb = new StringBuffer();
    InputStream is = null;
    HttpConnection hc = null;
    try {}
    long bytesLength = 0;
    int ch = 0;
    HC = (HttpConnection), Connector.open (url);
    is = hc.openInputStream ();
    bytesLength = hc.getLength ();
    If (bytesLength! = - 1) {}
    for (int i = 0; i)< byteslength;="" i++)="">
    If ((ch = is.read (())! = - 1) {}
    SB. Append ((Char) ch);
    }
    }
    } else {}
    While ((ch = is.read (())! = - 1) {}
    bytesLength = is.available ();
    SB. Append ((Char) ch);
    }
    }
    parseJSON (sb.toString ());
    } {Finally
    is. Close();
    HC. Close();
    }
    }

    {} public void parseJSON (String sb)
    try {}
    JSONObject jo = new JSONObject (sb);
    If (jo! = null) {}
    JSONObject channel = jo.getJSONObject ("channel");
    If (channel! = null) {}
    JSONArray points = channel.getJSONArray("item");
    If (items! = null) {}
    for (int i = 0; i)< items.length();="" i++)="">
    JSONObject point = items.getJSONObject (i);
    this.jsonTitles [i] = item.getString ("title");
    this.jsonImages [i] = item.getString ("image");
    }
    }
    }
    }
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }

    public getLabelField (String title) {} LabelField
    LabelField lf = new LabelField (title);
    return of lf;
    }

    public BitmapField getBitmapField (String url) throws IOException {}
    InputStream is = Connector.openInputStream (url) (InputStream);
    BitmapField bf = null;
    try {}
    ByteArrayOutputStream Baos = new ByteArrayOutputStream();
    int ch;
    While ((ch = is.read (())! = - 1) {}
    Baos.Write (ch);
    }
    imageData Byte = baos.toByteArray ();
    BF = new BitmapField (EncodedImage.createEncodedImage (imageData, 0,))
    (imageData.length) .getBitmap ());
    } {Finally
    If (is! = null) {}
    is. Close();
    }
    }
    return (bf == null? null: bf);
    }

    }

  • Get the checksum of the database objects

    Hi, is it possible to get the hash of the database objects (called features) using PL SQL?

    Constraints I manually copy certain functions I write dev to UAT, but want to make sure to have all the objects schema are identical (have the same checksum).

    See you soon.

    With the help of Oracle XE 11 G on Linux.

    You can use rawtohex (dbms_crypto.hash (dbms_metadata.get_ddl ('PACKAGE', , ), DBMS_CRYPTO.hash_md5)), for example:

    select rawtohex(dbms_crypto.hash(dbms_metadata.get_ddl('PACKAGE', 'MY_PKG', 'MY_USER'), 2)) hashval
    from dual;
    
  • get the position of the selected object

    is there a way to get the position of any selected object? It seems you should dive into a specific element such as frameworks of texts related to get the position, but he was curious to know if there was a generic way to do for the selected objects.

    If it's an item selected, Yes, if more than one, Yes, but it needs analysis

    Alert(App.activeDocument.Selection[0].position)

  • How to get a list of the dependent object of an apex application

    Hello

    Is it possible to get all the objects with a dependency on an apex application? I need the list of all the objects (Tables, views, MViews, procedures, functions, Packages etc.) even if they are referenced in the process page, postings or even in the security of the page.

    I tried to object dependencies Application and database object dependencies report, but it seems that it does not cover the validations and the process of the page. Please confirm that as well.

    My apex version is 3.2

    Any help will be much appreciated.
    Thanks in advance!

    Prasanth

    Prasanth wrote:

    Is it possible to get all the objects with a dependency on an apex application? I need the list of all the objects (Tables, views, MViews, procedures, functions, Packages etc.) even if they are referenced in the process page, postings or even in the security of the page.

    I tried to object dependencies Application and database object dependencies report, but it seems that it does not cover the validations and the process of the page. Please confirm that as well.

    My apex version is 3.2

    Support for APEX 3.2 expired in February 2012, so it is strongly recommended to upgrade to take advantage of the multitude of new features introduced in 4.x and 5.0, and most important to get all the security enhancements added since 2009.

    I don't have access to an instance of 3.2 at the present time, however the report dependencies of APEX 5.0 database is showing objects referenced in process, Validations, Conditions and authorisation schemes. If it has been improved since the 3.2, so it clearly is another good reason to upgrade.

    If you find that dependencies for database report does not meet your needs, then you can create your own tool by using queries custom views of the APEX.

  • Get the custom IdocScript function contributor data file

    Hello

    I have a requirement to retrieve a number of elements of a given contributor data file. The problem is, I don't know how to retrieve the XML code inside a custom component of IdocScript.

    Given the content of the data contributor file ID, is there an easy way to get the XML file, or do I need to use with a service call?

    Thank you!

    If it's a Java component, why not just get the direct file system XML file? The demand function, you could have a file path in the binder... If not, use the IdcFileDescriptor object:

    https://groups.Yahoo.com/neo/groups/intradoc_users/conversations/topics/25937

  • Make custom arrowhead. Cannot use spacing customized to an anchored object that is "path"?

    Hello world

    I build a model to use for the preparation of the documents for the brand of the company. I'm trying to find an easy way to make custom arrows that we will use for the legends (see below).

    Screen Shot 2015-05-26 at 10.09.54 AM.png

    What I want to do is to find a quick way to create this arrow to use for captions in my document. The main elements are the tip of the arrow 2-tone and the circle for a tail. I know that Indesign has a tail of the arrow circle but the problem with its use, it is that the color should be the same as the race and also the size of the circle is determined by the size of the race. As far as I know, Indesign does allow you to change those.

    I tried to use this type of path:

    http://InDesignSecrets.com/making-custom-arrawheads.php

    It works very well, but you can still see the path because the path is flush with the edge of the anchored object and the end of the path is visible behind the anchored objects. I think to be able to define these objects anchored with custom positioning would solve this problem. The problem is that I don't think that Indesign lets you define objects anchored to the positioning personalized text on a path, because this option is grayed out in the anchored object options.

    I was wondering if there is another way to create an offset for anchored objects or if there is a better way to make these custom arrow heads.

    Could there be a way to use objects from a library to create custom arrowheads? Also, is there a way to do this while a style object so that arrows can to shoot quickly and then simply apply the style of the object to get the correct formatting?

    I know that this is not possible and may have to be done manually, but I'll try to find a quick and easy way to make these arrows so that other people who have to use this model won't screw up their.

    Any help/ideas would be appreciated! Thank you all!

    Jacob F.

    Well, if anyone is interested, I sort of solved the problem.

    First, it was decided that the rounded tail of the arrow and the line should use the same darker green color. I still had solved the problem of adjusting the size of the circle but this trick of Eugene Tyson that:

    change the size of the arrowhead?

    Once I did, I made a style of object out of it, so that I can quickly draw lines, and at least add the tail quickly.

    As far as the head is concerned, I still have not found an automated way to do, but I have an easier way than what makes from scratch. I was directed in the right direction with the help of type on a path, but I was able to get the arrow flush with the end of the path and not past it. I saw a tutorial on Lynda.com, that shows you how make arrowhead custom and found a missing piece of the puzzle. It turns out that InDesign uses the same grips that you get when you add the type on a path in Illustrator. The trick to get the anchored object overlap the end of the path is to adjust the object anchored using these handles... After that, the axis of the anchored object y can be adjusted manually with the selection tool. Note that only the y axis (which is actually your baseline) can be modified because InDesign does not allow embedded objects that are typed to a path using a custom positioning. At this time, I don't bother centering the text on the path because the y-axis for my form must be adjusted in any case.

    So that's the solution I came up with that. If someone wants to share a solution better or more automated, I would really like to hear it.

    Thank you!

  • Setting of annotations / fields customized directly through VM object

    Hi all

    How can you I set the value of an annotation / customfield directly via the virtual machine object?

    $myVM.CustomFields holds all customfields, how to update a value via $myVM.CustomFields?

    for example to retrieve a value I can do:

    $myValue = $myVM.customfields | where {$_.key - eq "MyField"} | Select value - expandproperty

    It is significantly faster than get-annotation.

    How to SET the value by the same mechanism?

    Concerning

    marc0

    Hello, marc045-

    Once you have the virtual computer object, you should be able to change/update an existing custom value using .net method of the object View, "setCustomValue."  You use this method as such:

    $myVM.ExtensionData.setCustomValue("myField", "sweet new value")
    

    The method takes 2 two channels: the key name and the value to set for this key.  You can find this information by browsing QAnywhere vSphere to http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/index.html, or by using the Get-Member cmdlet:

    $myVM.ExtensionData | Get-Member setCustomValue
    

    Enjoy

  • When I right click on the list box column Multi that I should get the custom options

    Hi all

    In my application, I want to display the custom user menu when it right-click on the Multi column list box. I want to know is - it possible to do like this. Please can someone help me on this?

    in abow picture I get "reset default value, cut, copy the data, past data" so I need to set other options.

    Kind regards

    Santhosh M

    Hi santosh,.

    This one is much better.

  • How can I get a customer support override key number inorder to activate microsoft money more deluxe?

    I tried to activate this product online, but could not do checking of the products.  He said that I need a key number customer support override.  Please tell us how to get it.

    Thank you.

    Hi, Carol.

    For queries related to Microsoft Money, ask your questions in the link below.

    http://social.Microsoft.com/forums/en-us/money

  • I connect to a database through VS 2010. Suddenly, I get an error message indicating this object reference is not set to an instance of an object

    I use VS2010 professional edition. I used it for my long term project. And the database I use SQL server 2005. When connecting to the database using Server Explorer, I get the object reference is not set to an instance of the error object. I have tried many steps in the microsoft forums. But the bumps still error.

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en-us/winserverfiles/threads

  • Get the canvas/screen of an object as a bitmap graphics? Help with post processing filter!

    Let's say I want to create an effect of post-processing, such as changing the pixels of the screen in a color a little more red (AFTER this drawing), or do a screen wavey distortion.

    I thought that my layout as follows:

    final class MyPaintScreen extends FullScreen{
        //
        //... stuff here
        //
        public void paint(Graphics g){
            //all kinds of draw commands here, then
            //the post processing method is called
            PostProcesser.modify(g);
        }
    
    }
    final class PostProcesser{
        final static void modify(Graphics g){
            //here lies the problem.
        }
    }
    

    Ideally, the modify method would use the Graphics object as a parameter, and it would get her a bitmap or an array of bytes/int with the data drawn. Then she do all that the pixel values and then crush them to the Graphics object. Or maybe it would do all this without copying it in a bitmap/picture and just edit a graphic field directly.

    I thought that it would be a way to get an article / a region which was drawn (I want my post method only affect an area of the screen), but there is no method to return the screen stretched somehow, it seems. There is no Bitmap field in class Graphics to mess with. No table with the pixel values. No getBitmap/getRegion method.

    After thinking long and hard, I thought to use a sort of buffer to the screen. Have a Bitmap of the size of the screen and instead draw things on the screen, draw them on the Bitmap object, and then apply the post treatment methods he and then draws the Bitmap over together on the Graphics object... but it seems so memory intensive. Moreover, I have to use the thingies setARGB awful and messy the bitmap instead of the methods of the Graphics class Drawing.

    Any advice on that? Comments? Help? Suggestions?

    Just to confirm the approach of the buffer, you can create a bitmap image in the desired size, create a Graphics using the bitmap object, and then you can call 'paint' provide your own Bitmap, rather than the image of the screen image.

    You can also get it current graph of the screen using . getGraphics().

    Not sure this helps.  Good luck.

  • I get this nasty error that says [Object Error] I tried to click on it to get rid of, but won't go away

    I get this error mean in the box that says [Object Error] I tried to click on the OK to get rid of it, but won't go away. I tried to close the box by clicking the X, but nothing happens. Help, please.

    Hi Dégal,

    Thanks for posting your query in the Microsoft Community Forums.

    I understand from the description of the problem, you receive the error of the object on the Windows 7 computer.

    I understand this must be frustrating, but don't worry, we're here to help and guide you in the right direction.

    I would appreciate if you can help me with the following information.

    1. When you receive this error of the object?

    2. what browser you use on the computer?

    If you experience this problem when you use Internet Explorer, I suggest you to try these methods and check if it helps.

    Method 1

    Use the Internet Explorer (No Add-ons) mode

    To do this, click Start, point to programs, point to Accessories, point to System Toolsand then click Internet Explorer (No Add-ons).

    If this resolves the problem, follow these steps to isolate the browser add-on that is causing the problem:

    1. click on Toolsand then click Internet Options.

    2. click on the tab programs , and then click Manage Add-ons.

    3. click an add-on in the list name and then click disable.

    4. Repeat step 3 until you identify the add-on that is causing the problem.

     

    Method 2

    To reset Internet Explorer, see the links below.

    http://support.Microsoft.com/kb/923737

    Note: "Please note that the reset Internet Explorer (IE) resets all of the settings defined by the user, including those established by the installed extensions, toolbars and other add-ons for IE by default. This includes all the security, privacy and settings area. Also this will erase browsing history, delete all temporary Internet, cookies, form data files and especially all the passwords. »

    It will be useful.

    Let us know if you encounter problems under Windows in the future. We will be happy to help you.

Maybe you are looking for