您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > linux/Unix相关 > 基于Qt的嵌入式Linux通讯簿程序设计
4520093()Vol1452009No13JournalofNorthwestNormalUniversity(NaturalScience):2009201207;:2009203221:(1967),,,,.E2mail:myjmyj@nwnu1edu1cnQtLinux1,1,2,1(11,730070;21,453007):,LinuxQt(GUI).,QtLinux,QtDesigner.:Qt;Linux;:TP392:A:10012988(2009)0320045204AnimplementationofanaddressbookapplicationbasedonQt&embeddedLinuxMAYong2jie1,YUANQiu2lin1,2,ZHANGYan1(11CollegeofPhysicsandElectronicEngineering,NorthwestNormalUniversity,Lanzhou730070,Gansu,China;21CollegeofPhysicsandInformationEngineering,HenanNormalUniversity,Xinxiang453007,Henan,China)Abstract:Withthedevelopmentofembeddedsystem,theimplementationofapplicationbasedonQtandembeddedLinuxisanemphasisinresearchingtheembeddedGUIsystem.SomekeytechnologyofanapplicationbasedonQtandembeddedLinuxisintroducedindetailbydesignofaddressbook,suchasapplicationofQtDesignerandsignal2slot,theimplementationofaddressbookfunctioncodesandthewholeprocessofthisprogramme.Keywords:Qt;Linux;embeddedsystemLinux,;Qt,Signal2Slot(),[1].Qt,LinuxQt.(Embeddedsystem),LinuxQtGUI,.,Qt,2002,,,.,,Qt.[2][4]LinuxQt,.,,,.54()45JournalofNorthwestNormalUniversity(NaturalScience)Vol1451QtLinux,[5].QtQtE.ARM920TS3C2410X,203MHz.REDHATLINUX910,214118.MINICOM,Tro11Tech:qt2x1122.3.2,qt2embedded22.3.10,arm2linux2gcc231411.,.111.,progen:progen2tapp1t2oAddressBook.proAddressBook1pro,(113).112QtDesignerQtDesignerQt,,..2TextLable,1LineEdit,1ComboBox1PushButton,ComboBoxName,Telephone,Email,Address4.,4TextLable4LineEdit.1ListView2PushButton,ListView1List4Column(Name,Telephone,Email,Address).Qt,Signal2Slot().Signal,Qt,clicked.Slot,,.SignalSlot,connectSignalSlot.,,,connect.1.1Fig1Abstractofsignalsandslotsconnections5Signal2Slotconnect:connect(add,SIGNAL(clicked()),this,SLOT(addSlot)));connect(edit,SIGNAL(clicked()),this,SLOT(editSlot)));connect(del,SIGNAL(clicked()),this,SLOT(delSlot)));connect(exit,SIGNAL(clicked()),this,SLOT(exitSlot)));connect(search,SIGNAL(clicked()),this,SLOT(searchSlot)));(23),AddressBook1uiNew1ui.2Fig2AddressBookmainwindow6420093:QtLinux2009No13AnimplementationofanaddressbookapplicationbasedonQt&embeddedLinux3Fig3Newcontactwindow113QtuicAddressBook1uiAddressBook1hAddressBook1cpp(,uicNew1uiNew1hNew1cpp):uic2oAddressBook.hAddressBook.uiuic2oAddressBook.cpp2implAddressBook.hAddressBook.uiAddressBook1cpp.,AddressBook1cppAddressBook:voidAddressBookaddSlot(),:stringlSQLStringlSQLString:lSQLString=CreateTable+ConstDBTBL_ADDRESS+(+ConstDBCOL_NAME+,+ConstDBCOL_TELEPHONE+,+ConstDBCOL_EMAIL+,+ConstDBCOL_ADDRESS+,+);,:voidAddressBookeditSlot():entry-setName(lRows[0]);//10nameentry-setTelePhone(lRows[1]);//11telephoneentry-setEmail(lRows[2]);//12emailentry-setAddress(lRows[3]);//13address,:voidAddressBookdelSlot(),:stringlSQLString;lSQLString=Deletefrom+ConstDBTBL_ADDRESS+where+ConstDBCOL_NAME+=+aName;,:voidAddressBooksearchSlot(),:stringlSQLString=Select+ConstDBCOL_NAME+,+ConstDBCOL_TELEPHONE+,+ConstDBCOL_EMAIL+,+ConstDBCOL_ADDRESS+from+ConstDBTBL_ADDRESS+where+ConstDBCOL_NAME+=+aName;,AddressBook1h,New1h,New1cpp,SQL1cpp,SQL1h.114Qtmain1cpp..AddressBookmain1cpp:intmain(intargc,char33argv){QApplicationAddressBook(argc,argv);//Qapplication,AddressBook3AddressBook=newAddressBook(log);//app.setMainWidget(mainWin);//mainWinmainWin-show();//mainWinreturnAddressBook.exec();//Qt}115,74()45JournalofNorthwestNormalUniversity(NaturalScience)Vol145AddressBook1cpp,AddressBook1h,New1h,New1cpp,SQL1hSQL1cppAddressBook1pro:HEADERS=AddressBook.hNew.hSQL.hSOURCES=AddressBook.cppNew.cppSQL.cppmain.cpp116Makefile,Makefile1Qtqmake(.pro)Makefile,make:qmake2oMakefileAddressBook.promakeAddressBook.,4(Name)Matrix,5Matrix.4Fig4Querycontactinname5Fig5EditnewcontactpsinformationVirtualframebuffer(),.QTEDIR/lib.2,4.Qt,QtDesigner,Qt,,X.LinuxQtGUI.:[1]TROLLTECH.Qt4Whitepaper[OL].[2],,,.Qt/EmbeddedLinux[J].,2006,23(2):1052107.[3],,.LinuxQt/Embedded[J].,2007,23(1222):62263.[4],,.Linux[J].,2005,22(6):81283.[5],.Linux[M]..:,2007.[6][]MATTHEWN,STONESR.Linux[M]..,,.:,2007.[7][]BLANCHETTEJ,[]SUMMERFIELDM.C++GUIQt4[M]..,.:,2008.[8][]EZUSTA,EZUSTP.C++Qt4[M].,,.:,2007.()84
本文标题:基于Qt的嵌入式Linux通讯簿程序设计
链接地址:https://www.777doc.com/doc-7027504 .html