×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    40

    Filtering qml documentgallery for images not working

    hello,
    i try to open all the pictures of my mobile device in a view but not the ones there are in a specific foulder ( e:/kurier/ ...)
    Code:
    import QtQuick 1.0
    import Qt 4.7
    
    import QtMobility.gallery 1.1
    
    
    
    
     Rectangle {
         id: mainRect
    
         property int sel: -1
    
         GridView {
             id: gridnow
             anchors.fill: parent
             cellWidth: 120
             cellHeight: 100
           highlight: Rectangle  {color: "lightsteelblue"}
            highlightFollowsCurrentItem: false
             focus: true
    
            
    
    
    
             model: DocumentGalleryModel {
                 id: galmod
                 rootType: DocumentGallery.Image
                 properties: [ "url" ,
                     "title",
                     "lastModified",
                     "dateTaken"]
                 sortProperties: ["lastModified (ASC)","dateTaken (ASC)" ]
                 filter: GalleryContainsFilter {
                      property: "url"
                      value: "kurier"
                      negated: true;
    
                 }
    
            
             }
    
             delegate:
    
             Rectangle {
    
                 id: container
                 color:  "white"
                 width: 120
                 height: 100
                  property int a: 0;
                 function changePic()
                 {
                     galSignal.signalModus();
                     console.log("count " + galmod.count);
                     console.log("index" + index);
    
                     if(mainRect.sel != -1)
                     {
                         console.log("col " + galmod.get(mainRect.sel).url);
                      //  galmod.get(mainRect.sel).color = "black";
                         galmod.setProperty(mainRect.sel,"color","black");
                       //  container(mainRect.sel).color = "black";
                     }
    
                                     if(container.a == 0)
                                                 {
    
                                                    container.color = "#cc0033";
                                                     container.a = 1;
                                                        galSignal.signalChoosePic(galmod.get(index).url);
                                                        mainRect.sel =  index;
                                                 }
                                      else
                                                 {
                                                      container.color = "white";
                                                                    mainRect.sel = -1;
                                                     container.a = 0;
                                                 }
                  }
                 Connections {
                       target: galSignal;
                       onSignalModus: container.color = "white";
    
                 }
    
    
    Item
    {
                 Image {
                id: originalImage
                 source: url
    
                 fillMode: Image.PreserveAspectFit
                 onStatusChanged: if (originalImage.status == Image.Ready)
                                  {
    
                                      console.log('Loaded ' + url);
                                      //originalImage.source = "qrc:/res/grafik/noprev.png";
    
    
                                  }
                                    else
                                  {
                                      if(originalImage.status == Image.Error)
                                      {
                                        originalImage.source = "qrc:/res/grafik/noprev.png";
                                          orginalText.text = galSignal.fileName(url);
                                      }
                                  }
    
                 width: 110
                 x: 5
                 y: 5
                 height: 90
                 }
                 Text {
                     x: 10
                     y: 15
                     id: orginalText
                     text:  ""
                      color: "white"; elide: Text.ElideLeft; font.pixelSize: 13;
                         width: 110
                     height:  90
    
    
    
                 }
    }
    
              MouseArea {
                     anchors.fill: parent
                     onClicked: changePic();
                 }
             }
    
    
    
         }
    
    }
    i get a message that there is a property used value not functioning...
    using no filter it is working
    THx Paul

  2. #2
    Registered User
    Join Date
    Jul 2006
    Location
    Finland
    Posts
    26

    Re: Filtering qml documentgallery for images not working

    Hi Paul,

    I ran into the same problem: http://www.developer.nokia.com/Commu...yModel-filters

    Seems that there is already a bug created for it (http://bugreports.qt.nokia.com/browse/QTMOBILITY-1656).

    Cheers! Robert
    -Rob

Similar Threads

  1. SVG images scaled in QML
    By krix in forum [Archived] Qt Quick
    Replies: 3
    Last Post: 2011-05-18, 16:09
  2. [moved] Qml is not working in MeeGo sdk 1.1
    By kotesh.06521 in forum [Archived] Qt SDKs and Tools
    Replies: 6
    Last Post: 2011-03-16, 12:48
  3. [moved] working with sms filtering using silentsms
    By anwar21387 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2009-03-27, 00:15
  4. Tab images not working
    By Mohammad_azadi in forum Streaming and Video
    Replies: 1
    Last Post: 2005-10-02, 00:40
  5. Replies: 8
    Last Post: 2003-09-05, 11:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×