Join Today
+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
Like Tree12Likes

Thread: E6SDK initial crack, it is able to inherit ZMainWidget and now ZMultiLineEdit is well worked!(update 11.14)

  1. #11
    Join Date
    Oct 2007
    Location
    Russia
    Posts
    8

    Default

    to foxe6 (and other devels):
    Please, post a "Hello world!" program with this SDK.

  2. #12
    Join Date
    Jul 2007
    Location
    Samut Prakarn, Thailand
    Posts
    79

    Default

    Quote Originally Posted by Serge_RUS View Post
    to foxe6 (and other devels):
    Please, post a "Hello world!" program with this SDK.
    PHP Code:

    // wintest.h

    #ifndef __WINTEST_H__
    #define __WINTEST_H__

    #include <zmainwidget.h>

    class WinTest : public ZMainWidget
    {
    public:
        
    WinTest();
        ~
    WinTest();

    public 
    slots:
        
    void btnClicked();
    };

    #endif //__WINTEST_H__ 
    PHP Code:
    // wintest.cpp

    #include <stdio.h>

    #include <qwidget.h>
    #include <qscrollview.h>
    #include <qpushbutton.h>
    #include <ezxutilcst.h>
    #include <zpushbutton.h>
    #include <zapplication.h>
    #include <qpopupmenu.h>
    #include "wintest.h"

    QLabel *lp 0;

    WinTest::WinTest()
      :
    ZMainWidget(falseNULLNULL0)
    {
        
    UTIL_CST *cst;
        
    ZPushButton *wp;
        
    QPopupMenu *pp;

        
    cst = new UTIL_CST(this"");
        
    setCSTWidget(cst);
        
    cst->show();

        
    wp cst->getRightBtn();
        
    connect(wpSIGNAL(clicked()), qAppSLOT(slotQuickQuit()));

        
    pp = new QPopupMenu(cstNULL);
        
    //connect(pp, SIGNAL(activated(int)), SLOT(menuSelect(int)));
        
    pp->insertItem(tr("Test Menu 1"));
        
    pp->insertItem(tr("Test Menu 2"));
        
    pp->insertItem(tr("Test Menu 3"));

        
    wp cst->getLeftBtn();
        
    wp->setPopup(pp);


        
    pp = new QPopupMenu(cstNULL);
        
    //connect(pp, SIGNAL(activated(int)), SLOT(menuSelect(int)));
        
    pp->insertItem(tr("Mid Menu 1"));
        
    pp->insertItem(tr("Mid Menu 2"));
        
    pp->insertItem(tr("Mid Menu 3"));

        
    wp cst->getMidBtn();
        
    wp->setPopup(pp);

        
    QScrollView *content = new QScrollView(this);
        
    setContentWidget(content);
        
    content->show();

        
    ZPushButton *qwp = new ZPushButton(this);
            
    qwp->setText("TEST");
            
    qwp->setGeometry(90,120,100,26);
            
    qwp->show();
            
    connect(qwpSIGNAL(clicked()), thisSLOT(btnClicked()));
        
    content->addChild(qwp90120);

        
    lp = new QLabel("Hello, world!n" "Try the menu!"this"main_label");
        
    //setContentWidget(lp);
        
    lp->show();
        
    content->addChild(lp1025);
    }

    WinTest::~WinTest()
    {
        if (
    lpdelete lp;
    }

    void WinTest::btnClicked()
    {
        
    printf("qwp::clicked()n");
        
    lp->close(TRUE);
        
    delete lp;
        
    lp 0;

    PHP Code:
    // main.cpp

    #include <zapplication.h>
    #include "wintest.h"

    int main(int argcchar** argv)
    {
        
    ZApplication app(argcargv);
        
    app.enableTouchSound(FALSE);
        
    app.showMainWidget(new WinTest());
        return 
    app.exec();

    Last edited by donga; 11-17-2007 at 11:47 AM.
    swifty, digitalD and Serge_RUS like this.
    Sad but TRUE and Nothing else matter about Native EZX SDK , How to ROKR ?

  3. #13
    Join Date
    Jul 2005
    Location
    Franconia
    Posts
    4,866

    Default

    thanks donga!
    this will be a seed for a lot of new programs
    here is a nice "hello world!" collection:
    http://www.gnu.org/fun/jokes/helloworld.html

  4. #14
    Join Date
    Feb 2007
    Location
    SG
    Posts
    99

    Default

    I hope there will be a SDK for E2 too...

  5. #15
    Join Date
    Sep 2006
    Location
    UK
    Posts
    1,145

    Default

    There is, it was released several months ago, check www.e2mod.com
    Regards,
    Akshay

  6. #16
    Join Date
    Feb 2007
    Location
    SG
    Posts
    99

    Default

    Quote Originally Posted by aksd View Post
    There is, it was released several months ago, check www.e2mod.com
    that sdk has many missing features, its not a full sdk...

  7. #17

    Default

    11. amglobal.h 新增,不完整.

    #ifndef _AMGLOBAL_H_
    #define _AMGLOBAL_H_

    class AM_Global
    {
    public:
    enum Apps{Apps_0, Apps_1, Apps_2, Apps_3, Apps_4, Apps_5, Apps_6,
    Apps_7, Apps_8, Apps_9, Apps_A, Apps_B, Apps_C, Apps_D,
    Apps_E, Apps_F, Apps_10, Apps_11, Apps_12, Apps_13, Apps_14,
    Apps_15, Apps_16, Apps_17, Apps_18, Apps_19, Apps_1A, Apps_1B,
    Apps_1C, Apps_1D, Apps_1E, Apps_1F, Apps_20, Apps_21, Apps_22,
    Apps_23, Apps_24, Apps_25, Apps_26, Apps_27, Apps_28, Apps_29,
    Apps_2A, Apps_2B, Apps_2C, Apps_2D, Apps_2E, Apps_2F, Apps_30,
    Apps_31, Apps_32, Apps_33, Apps_34, Apps_35, Apps_36, Apps_37,
    Apps_38, Apps_39, Apps_3A, Apps_3B, Apps_3C, Apps_3D, Apps_3E,
    Apps_3F, Apps_40, Apps_41, Apps_42, Apps_43, Apps_44, Apps_45,
    Apps_46, Apps_47, Apps_48, Apps_49, Apps_4A, Apps_4B, Apps_4C,
    AppsAlarmClock, Apps_4E, Apps_4F, Apps_50, Apps_51, Apps_52,
    Apps_53, Apps_54, Apps_55, Apps_56, Apps_57, Apps_58, Apps_59,
    Apps_5A, Apps_5B, Apps_5C, Apps_5D, Apps_5E, Apps_5F, Apps_60,
    Apps_61, Apps_62, Apps_63, Apps_64};
    };

    #endif
    12. zconfig.h, 配置读/写基类,新增.

    #ifndef _ZCONFIG_H_
    #define _ZCONFIG_H_

    class ZConfig
    {
    public:
    int writeEntry(const QString&, const QString&, char*);
    int writeEntry(const QString&, const QString&, const QStringList&, const QChar&);
    int writeEntry(const QString&, const QString&, const QString&);
    int writeEntry(const QString&, const QString&, bool);
    int writeEntry(const QString&, const QString&, double);
    int writeEntry(const QString&, const QString&, int);
    int writeEntry(const QString&, const QString&, unsigned);
    int readNumEntry(const QString&, const QString&, int);
    int readBoolEntry(const QString&, const QString&, bool);
    int readListEntry(const QString&, const QString&, const QChar&);
    int readUIntEntry(const QString&, const QString&, unsigned);
    int readEntryDirect(const QString&, const QString&, const QString&);
    int getGroupsKeyList(QStringList&);
    int getSettingDirectory(void);
    int initSettingDirectory(void);
    int getGroupEntriesKeyList(const QString&);
    int read(void);
    int write(const QString&);
    int setGroup(const QString&);
    int parseLine(const QString&);
    int readEntry(const QString&, const QString&, const QString&);

    ZConfig(const bool);
    virtual ~ZConfig();
    virtual int removeEntry(const QString&, const QString&);
    virtual int clearGroup(const QString&);
    virtual int flush();

    protected:

    private:
    void* ConfigData;
    };

    #endif
    13. SetupSetManager.h, 新增,读写ezx_system.cfg配置的类.文件有点像Ini文件,使用参见后面的例子.

    #ifndef _SETUPSETMANAGER_H_
    #define _SETUPSETMANAGER_H_

    #include <AmGlobal.h>
    #include <ZConfig.h>

    class SETUP_SET_Manager: public ZConfig
    {
    public:
    SETUP_SET_Manager(QString, bool);
    SETUP_SET_Manager(AM_Global::Apps, bool);

    virtual int clearGroup(QString);
    virtual int removeEntry(QString, QString);
    int getSettingInfo(QString Section, QString Name, QString& Value, QString Default, bool);
    int getSettingInfo(QString Section, QString Name, bool& Value, bool Default);
    int getSettingInfo(QString Section, QString Name, int& Value, int Default);
    int getSettingInfo(QString Section, QString Name, unsigned& Value, unsigned Default);
    int getSettingInfo(QString Section, QString Name, unsigned short& Value, unsigned short Default);
    int setSettingInfo(QString Section, QString Name, QString, bool);
    int setSettingInfo(QString Section, QString Name, bool);
    int setSettingInfo(QString Section, QString Name, int);
    int setSettingInfo(QString Section, QString Name, unsigned);
    int setSettingInfo(QString Section, QString Name, unsigned short);
    int getEntryKeyList(QString);
    int getSettingFileName(AM_Global::Apps);
    virtual int flush(void);

    virtual ~SETUP_SET_Manager();
    protected:

    private:
    };


    #endif
    13.demo 读取配置的示例

    SETUP_SET_Manager mgr(AM_Global::AppsAlarmClock, false);
    unsigned Value = 0;
    bool bValue = false;

    mgr.getSettingInfo("ALARMCLOCK", "snoozeTime", Value, (unsigned)5);
    mgr.getSettingInfo("ALARMCLOCK", "powerOffAlarm", bValue, true);

    printf("snoozeTime: %d\n", Value);
    printf("powerOffAlarm: %s\n", bValue ? "true" : "false");

    mgr.setSettingInfo("ALARMCLOCK", "snoozeTime", (unsigned)15);
    mgr.setSettingInfo("ALARMCLOCK", "powerOffAlarm", true);
    mgr.flush();

  8. #18

    Default

    THANK YOU foxe6 !

  9. #19
    Join Date
    Nov 2005
    Location
    Brazil
    Posts
    308

    Default

    Motorola Quench

    A1200i - Firmware: 42pL7 2.0


    E398: R373 R49 custom firmware

  10. #20

    Default

    Thanks foxe6 ! 2007/11/21 ZMulitLineEdit.h /update:http://club.ccmove.com/nclub/topicdi...857838-14.html


 
+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: 12-05-2009, 02:10 PM
  2. Replies: 15
    Last Post: 11-07-2008, 01:44 PM
  3. INFO: Using MGMaps on A1200 Ming - what worked for me
    By imported_p_trick in forum A1200 General Chat
    Replies: 16
    Last Post: 10-27-2008, 09:37 PM
  4. zmainwidget: keyboard
    By painlesssunny in forum Development
    Replies: 0
    Last Post: 09-20-2008, 01:13 PM
  5. finally worked up the nerve to...
    By kora in forum A1200 General Chat
    Replies: 20
    Last Post: 10-21-2007, 05:50 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 Friendly URLs by vBSEO 3.6.0 RC 1