|
2# embedsky_lxt - /****************************************************************************
- ** Form interface generated from reading ui file 'first.ui'
- **
- ** Created: Mon Aug 9 13:16:40 2010
- ** by: The User Interface Compiler (uic)
- **
- ** WARNING! All changes made in this file will be lost!
- ****************************************************************************/
- #ifndef FIRST_H
- #define FIRST_H
- #include <qvariant.h>
- #include <qwidget.h>
- class QVBoxLayout;
- class QHBoxLayout;
- class QGridLayout;
- class QLineEdit;
- class QPushButton;
- class QTextBrowser;
- class QIODevice;
- class QTCore;
- class QLabel;
- class first : public QWidget
- {
- Q_OBJECT
- public:
- first( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
- ~first();
-
- protected:
- virtual void paintEvent(QPaintEvent* );
- public slots:
-
- };
- #endif // FIRST_H
- /****************************************************************************
- ** Form implementation generated from reading ui file 'first.ui'
- **
- ** Created: Mon Aug 9 13:16:40 2010
- ** by: The User Interface Compiler (uic)
- **
- ** WARNING! All changes made in this file will be lost!
- ****************************************************************************/
- #include "first.h"
- #include <qlabel.h>
- #include <qiodevice.h>
- #include <qlineedit.h>
- #include <qpushbutton.h>
- #include <qtextbrowser.h>
- #include <qlayout.h>
- #include <qvariant.h>
- #include <qtooltip.h>
- #include <qwhatsthis.h>
- #include "serial_test.h"
- #include <fcntl.h>
- #include <termios.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <errno.h>
- #include <ctype.h>
- #include <string.h>
- #include <time.h>
- #include <unistd.h>
- #include <qpainter.h>
- #include <qtextstream.h>
- #include <qdatastream.h>
- #include <qfile.h>
- #include <qimage.h>
- first::first( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
- {
- if ( !name )
- setName( "first" );
- resize( 584, 480 );
- setCaption( tr( "EmbedSky_First_Qt_Program" ) );
-
- }
- /*
- * Destroys the object and frees any allocated resources
- */
- first::~first()
- {
- // no need to delete child widgets, Qt does it all for us
- }
- void first::paintEvent(QPaintEvent *)
- {
-
-
- QPainter painter(this);
-
- QImage image;
- //image.load("root/Documents/kk.png");//true
- image.load("root/Documents/DD.jpeg","jpeg");//false
- //image.load("root/Documents/tt.jpg","jpg");//false
- painter.drawImage(0, 0, image);
- }
- #include "first.h"
- #include <qapplication.h>
- #include <qtopia/qpeapplication.h>
- QTOPIA_ADD_APPLICATION("first",first)
- QTOPIA_MAIN
复制代码 |
|