Join Today
Page 5 of 6 FirstFirst 123456 LastLast
Results 41 to 50 of 58
Like Tree2Likes

Thread: The way to E6/A1200 Native EZX Application

  1. #41
    Join Date
    Jul 2007
    Location
    Samut Prakarn, Thailand
    Posts
    79

    Default

    @Devola

    Here are my qefilebrowser.h and .cpp which used in QEZXPlayer and hope this would help you

    qefilebrowser.h
    PHP Code:
    /***************************************************************************
     *                                                                         *
     *   (c) 2007, Thanomsub Noppaburana <donga.nb@gmail.com>                  *
     *                                                                         *
     *   This program is free software; you can redistribute it and/or modify  *
     *   it under the terms of the GNU General Public License as published by  *
     *   the Free Software Foundation; either version 2 of the License, or     *
     *   (at your option) any later version.                                   *
     *                                                                         *
     *   This program is distributed in the hope that it will be useful,       *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
     *   GNU General Public License for more details.                          *
     *                                                                         *
     *   You should have received a copy of the GNU General Public License     *
     *   along with this program; if not, write to the                         *
     *   Free Software Foundation, Inc.,                                       *
     *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
     ***************************************************************************/

    #ifndef __QEFILEBROWSER_H__
    #define __QEFILEBROWSER_H__

    #include <qimage.h>
    #include <qpixmap.h>
    #include <qwidget.h>
    #include <qlabel.h>
    #include <qscrollview.h>
    #include <ezxutilcst.h>
    #include <zapplication.h>

    #include "lib/qeglobal.h"
    #include "lib/qewidget.h"
    #include "lib/qelistbox.h"


    /**
     *****************************************************************************
      Variables definitions
     *****************************************************************************
     */
    #define DIR_BASE_PHONE      "/ezxlocal/download/mystuff"
    #define DIR_BASE_MEMCARD    "/mmc/mmca1"

    static int baseItemCount 4;

    static const 
    char *listBaseItems[] = {
        
    QT_TR_NOOP("MyVideo"),
        
    QT_TR_NOOP("MyAudio"),
        
    QT_TR_NOOP("My playlists"),
        
    QT_TR_NOOP("Memory card")
    };

    static const 
    char *listBaseIcons[] = {
        
    "FMMS_Folder_Video_S.gif",
        
    "FMMS_Folder_Audio_S.gif",
        
    "FMMS_Personal_Folder_S.gif",
        
    "FMMS_Personal_Folder_S.gif"
    };

    static const 
    char *itemBasePath[] = {
        
    "/ezxlocal/download/mystuff/MyPhotos",
        
    "/ezxlocal/download/mystuff/MyRingTone",
        
    "/ezxlocal/download/mystuff/MyPlaylist",
        
    "/mmc/mmca1"
    };


    /**
     ***********************************************
     QEFileBrowser class definition
     ***********************************************
     */
    class QEFileBrowser : public QEUTIL_ListBox
    {
        
    Q_OBJECT
    public:
        
    QEFileBrowser(QWidget *parent, const char *name 0);
        ~
    QEFileBrowser();

        
    void setFileFilters(const QString &filter);
        
    void initFileList(const QString &filter="*"); // for start list files

        
    void changeDir(const QString &pathbool goUpDir FALSE);
        
    int  getPathLevel() { return m_pathLevel; };
        
    void setPathLevel(int level);
        
    void changeToUpDir(int step 0);
        
    QString getCurrentFile() const { return QString(m_currentFile); };
        
    QString getCurrentPath() const;

        
    bool selectPrevItem(bool click=FALSE);
        
    bool selectNextItem(bool click=FALSE);

    public 
    slots:
        
    void slotItemClicked(QEListBoxItem *, const QPoint &);

    signals:
        
    void dirItemClicked(const QString &);
        
    void fileItemClicked(const QString &);

    private:
        
    QString          m_nameFilter;
        
    QString          m_basePath;
        
    char             m_currentFile[256];
        
    bool             m_isloopItems;
        
    int              m_pathLevel;
    };

    #endif //__QEFILEBROWSER_H__ 
    and qefilebrowser.cpp
    PHP Code:
    /***************************************************************************
     *                                                                         *
     *   (c) 2007, Thanomsub Noppaburana <donga.nb@gmail.com>                  *
     *                                                                         *
     *   This program is free software; you can redistribute it and/or modify  *
     *   it under the terms of the GNU General Public License as published by  *
     *   the Free Software Foundation; either version 2 of the License, or     *
     *   (at your option) any later version.                                   *
     *                                                                         *
     *   This program is distributed in the hope that it will be useful,       *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
     *   GNU General Public License for more details.                          *
     *                                                                         *
     *   You should have received a copy of the GNU General Public License     *
     *   along with this program; if not, write to the                         *
     *   Free Software Foundation, Inc.,                                       *
     *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
     ***************************************************************************/

    #include <qdir.h>
    #include <ezxres.h>

    #include "qefilebrowser.h"



    /**
     *****************************************************************************
      class QEFileBrowser implementation
     *****************************************************************************
     */
    QEFileBrowser::QEFileBrowser(QWidget *parent, const char *name)
      : 
    QEUTIL_ListBox(parentname),
        
    m_isloopItems(FALSE),
        
    m_pathLevel(0)
    {
        
    m_nameFilter "*";
        
    widget()->setFrameStyle(QFrame::NoFrame);
        
    connect(thisSIGNAL(clicked(QEListBoxItem *, const QPoint &)), thisSLOT(slotItemClicked(QEListBoxItem *, const QPoint &)));
    }

    QEFileBrowser::~QEFileBrowser()
    {
    }

    void QEFileBrowser::setFileFilters(const QString &filter)
    {
        if (
    m_nameFilter == filter) return;
        
    m_nameFilter filter;
        
    changeDir("");
    }

    void QEFileBrowser::initFileList(const QString &filter)
    {
        if (
    m_nameFilter == filter) return;
        
    m_nameFilter filter;
        
    changeDir("");
    }

    QString QEFileBrowser::getCurrentPath() const
    {
        return 
    m_pathLevel=="BASEPATH" m_basePath;
    }

    void QEFileBrowser::changeToUpDir(int step)
    {
        for (
    int i=0i<=stepi++) changeDir(m_basePathTRUE);
        
    emit dirItemClicked(m_basePath);
    }

    void QEFileBrowser::setPathLevel(int level)
    {
        if (
    level >= m_pathLevellevel m_pathLevel;
        if (
    level <= 0level 0;
        if (
    level != m_pathLevel) {
            
    changeToUpDir(m_pathLevel level 1);
        }
    }

    void QEFileBrowser::changeDir(const QString &pathbool goUpDir)
    {
        
    RES_ICON_Reader resIcon;

        
    QEListBoxItem  *item;
        
    QString         itemPath;
        
    QString         iconName;

        if (
    goUpDirm_pathLevel--;

        if (
    m_pathLevel == 0) {
            
    widget()->clear();
            for (
    int i=0ibaseItemCounti++){
                
    item = new QEListBoxItem(widget(), tr(listBaseItems[i]), resIcon.getIcon(listBaseIcons[i], FALSE));
                
    widget()->insertItem(item);
            }
        }
        else {
            
    QDir dir;
            
    dir.cd(path);
            if (
    goUpDirdir.cdUp();
            
    dir.setNameFilter(m_nameFilter);
            
    dir.setSorting(QDir::DirsFirst);
            
    dir.setMatchAllDirs(TRUE);

            if (!
    dir.isReadable()) return;

            
    m_basePath dir.canonicalPath();

            
    widget()->clear();
            
    QStringList entries dir.entryList();
            
    QStringList::ConstIterator it entries.begin();
            while (
    it != entries.end()) {
                if ((*
    it != ".") && (*it != "..")) {
                    
    itemPath m_basePath "/" + *it;
                    
    iconName =
                        (
    QFileInfo(itemPath).isDir()) ?
                            
    "FMMS_Personal_Folder_S.g" :
                        (
    itemPath.right(4)==".wav" || itemPath.right(4)==".mp3" || itemPath.right(4)==".ogg" || itemPath.right(4)==".wma") ?
                            
    "FMMS_File_Audio_S.g" :
                            
    "FMMS_File_Video_S.g";
                    
    item = new QEListBoxItem(widget(), *itresIcon.getIcon(iconNameFALSE), FALSE );
                    
    //if (!QFileInfo(itemPath).isDir()) item->setItemCheckable(TRUE);
                    
    widget()->insertItem(item);
                }
                ++
    it;
            }
        }
    }

    bool QEFileBrowser::selectPrevItem(bool click)
    {
        
    int curIdx widget()->currentItem();
        if (
    curIdx <= 0) return FALSE// first item ?
        
    QListBoxItem *item widget()->item(--curIdx);
        if (
    item != NULL) {
            if (
    clickslotItemClicked((QEListBoxItem *)itemQPoint(0,0));
            
    widget()->setSelected(itemTRUE);
            
    widget()->centerCurrentItem();
            return 
    TRUE;
        }
        return 
    FALSE;
    }

    bool QEFileBrowser::selectNextItem(bool click)
    {
        
    int count  widget()->count();
        
    int curIdx widget()->currentItem();
        if (
    curIdx == count-1) return FALSE// last item ?
        
    QListBoxItem *item widget()->item(++curIdx);
        if (
    item != NULL) {
            if (
    clickslotItemClicked((QEListBoxItem *)itemQPoint(0,0));
            
    widget()->setSelected(itemTRUE);
            
    widget()->centerCurrentItem();
            return 
    TRUE;
        }
        return 
    FALSE;
    }

    void QEFileBrowser::slotItemClicked(QEListBoxItem *item, const QPoint &)
    {
        if (
    m_pathLevel == 0) {
            
    m_basePath itemBasePath[widget()->index(item)];
            
    m_pathLevel++;
            
    changeDir(m_basePath);
            
    emit dirItemClicked(m_basePath);
        }
        else {
            
    QString path m_basePath "/" item->text();
            if (
    QFileInfo(path).isDir()) { // dir selected
                
    strcpy(m_currentFile"NOTFILE");
                
    m_pathLevel++;
                
    changeDir(path);
                
    emit dirItemClicked(m_basePath);
            }
            else { 
    // file selected
                
    strcpy(m_currentFilepath.local8Bit());
                
    emit fileItemClicked(path);
            }
        }

    Sad but TRUE and Nothing else matter about Native EZX SDK , How to ROKR ?

  2. #42
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    3

    Default

    Hi,
    I want to begin with play a little bit with crosstools and ezx-devkit.
    But the Link lsb.blogdns.net/ezx-devkit is deed.
    Has anyone an idea, where I can get this from?

  3. #43

    Thumbs up

    thanks a lot, donga, I'll try it soon, thanks thanks

  4. #44
    Join Date
    Sep 2005
    Location
    Jakarta, Indonesia
    Posts
    1,091

    Default

    Waiting for a native winskin from donga

  5. #45

    Default

    Quote Originally Posted by donga View Post
    Regards,
    donga.
    qt-2.3.6,
    gcc-3 from yan0's crosstool
    samr7's headers,
    but i got this...

    arm-linux-g++ -o qeapptemplate src/lib/qeapplication.o src/lib/qeconfig.o src/lib/qeglobal.o src/lib/qemainwidget.o src/lib/qeobject.o src/lib/qewidget.o src/main.o src/qeapptemplate.o src/lib/moc_qemainwidget.o src/lib/moc_qeobject.o src/lib/moc_qepixmap_inc.o src/lib/moc_qewidget.o src/moc_qeapptemplate.o -L/home/mkezx/usr/lib -L/home/mkezx/usr/lib/ezx/lib -L/home/mkezx/qt-2.3.6/lib -lezxappsdk -lipp-jp -lezxopenwindow -lipp-miscGen -lipp-codecJP -lezxpm -lezxappbase -lqte-mt
    /usr/local/arm/bin/../lib/gcc-lib/arm-linux/3.3/../../../../arm-linux/bin/ld: warning: libezxjpeg.so.1, needed by /home/mkezx/usr/lib/ezx/lib/libqte-mt.so, not found (try using -rpath or -rpath-link)
    src/lib/qeapplication.o(.gnu.linkonce.r._ZTV13QEApplication+0x5c): undefined reference to `QApplication::insertStr(QWSEvent*)'
    collect2: ld returned 1 exit status

    libezxjpeg.so.1 is present (symlink)

    Can You help me?

    After add -rpath ... , I see:

    arm-linux-ld -rpath-link /home/mkezx/usr/lib/ezx/lib -o qeapptemplate src/lib/qeapplication.o src/lib/qeconfig.o src/lib/qeglobal.o src/lib/qemainwidget.o src/lib/qeobject.o src/lib/qewidget.o src/main.o src/qeapptemplate.o src/lib/moc_qemainwidget.o src/lib/moc_qeobject.o src/lib/moc_qepixmap_inc.o src/lib/moc_qewidget.o src/moc_qeapptemplate.o -L/home/mkezx/usr/lib -L/home/mkezx/usr/lib/ezx/lib -L/home/mkezx/qt-2.3.6/lib -lezxappsdk -lipp-jp -lezxopenwindow -lipp-miscGen -lezxappbase -lqte-mt -lezxjpeg -lezxpm
    arm-linux-ld: warning: cannot find entry symbol _start; defaulting to 0000a854
    src/lib/qeapplication.o(.gnu.linkonce.r._ZTV13QEApplication+0x5c): undefined reference to `ZApplication::insertStr(QWSEvent*)'
    make: *** [qeapptemplate] Ошибка 1
    Last edited by ilchenko; 11-07-2007 at 11:05 AM.

  6. #46
    Join Date
    Jul 2007
    Location
    Samut Prakarn, Thailand
    Posts
    79

    Default

    @blackhawk

    Quote Originally Posted by blackhawk View Post
    Waiting for a native winskin from donga
    I 'll trying to hack it soon .. before hard working on my fulltime job on next month



    @ilchenko
    please try to use my modified of samr7's header, and use my tmakespec (you may need a little modify).
    Sad but TRUE and Nothing else matter about Native EZX SDK , How to ROKR ?

  7. #47

    Default

    hey donga, is it too dificult for you and the developers, to port an ezx app from e680i to a1200 ? does it take too much time ?

  8. #48

    Default

    I think the main challange with porting from e680 and similar is that some kind of standard class usage that works fine on e680 fall into seg fault on a1200/E6. Donga, correct me if i'm wrong.

  9. #49

    Default

    does that mean it's impossible ?
    Last edited by dehzinho; 11-09-2007 at 08:12 PM.

  10. #50

    Default

    @donga, I'm sorry, your example is work with Your + Samr7's headers and libraries from phone. Thanks.


 
Page 5 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Native EZX messenger-GAIM,etc..
    By naset in forum Development
    Replies: 51
    Last Post: 02-08-2010, 09:42 PM
  2. Native ezx app/code sharing, tips and tricks
    By rpconnect in forum Development Stickys
    Replies: 50
    Last Post: 11-01-2007, 12:30 PM
  3. All application (Soft, Game and more) for EZX linux phone
    By boy_dn in forum E680i General Chat
    Replies: 5
    Last Post: 02-11-2007, 04:24 PM
  4. porting Opie application to ezx problem.
    By eakrin in forum Development
    Replies: 2
    Last Post: 06-26-2006, 11:30 PM
  5. anyone has IM native application
    By sky2k in forum E680i General Chat
    Replies: 1
    Last Post: 01-06-2006, 05:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Optimization by vBSEO 3.6.0 RC 1