Lecture 4: Embedded Application Framework Qt Tutorial Cheng-Liang (Paul) Hsieh ECE 424 Embedded Systems Design.

Slides:



Advertisements
Similar presentations
Object Oriented Programming
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
First Steps with Qt Julien Finet Kitware Inc. Jan. 05 th 2010.
CPSC 441 TUTORIAL – JANUARY 16, 2012 TA: MARYAM ELAHI INTRODUCTION TO C.
Sven Johannsen C++ User Group Aachen 01/08/15
QT GUI Programming CS340 – Software Design © 2009 – Jason Leigh University of Illinois at Chicago.
Advanced Object-Oriented Programming Features
Chapter 10 Inheritance, Polymorphism, and Scope. 2 Knowledge Goals Understand the hierarchical nature of classes in object-oriented programming Understand.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
II. Middleware for Distributed Systems
Inheritance and Polymorphism CS351 – Programming Paradigms.
Linux Qt Graphical User Interface (GUI) Development In this session, we will cover Qt GUI development tools including: Qt Creator for remote debug and.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
QT Intro. 김기형
L8: Qt4 Concept Qt Module QObject QObject Model Signal and Slot Qt Event Loop.
LAMAD Symbian Qt install and deploy Installing Qt SDK and deploying Qt applications.
Cross-platform approach to create the interactive application based on ROOT and Qt GUI libraries Rene Brun (CERN) Valeri Fine (BNL,
App Development on Android. Contents  First Milestone  Second Milestone  Third Milestone  Last Milestone 
An Overview of Qt - asankar1. Agenda About Qt –A brief intro of Qt Qt development tools –Tools used for building Qt application Qt Architecture –The underlying.
Object Oriented Software Development 1. Introduction to C# and Visual Studio.
LAMAD Symbian Qt Symbian OS One of the first modern mobile operating systems Most popular smartphone OS until the end of 2010 Main Nokia OS.
Oct ROOT 2002, CERN, Geneva Qt-Based Implementation of Low Level ROOT Graphical Layer By V.Fine.
Qt Igor November 8, 2002 Friday’s HENP Group Meeting.
OOP Languages: Java vs C++
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Blanchette and Summerfield, Ch. 2
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Josh Kilgore Obi Atueyi Tom Calloway Ye Tian 1 Software Engineering Spring 2010.
©Fraser Hutchinson & Cliff Green C++ Certificate Program C++ Intermediate Access Control.
FLTK Tutorial.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 24P. 1Winter Quarter C++ Lecture 24.
Using Qt for GUI development Brad Whitlock March 2002.
Prepared by: Elsy Torres Shajida Berry Siobhan Westby.
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Dale Roberts Introduction to Visual Programming Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
Getting started with Programming using IDE. JAVA JAVA IS A PROGRAMMING LANGUAGE AND A PLATFORM. IT CAN BE USED TO DELIVER AND RUN HIGHLY INTERACTIVE DYNAMIC.
-1- National Alliance for Medical Image Computing First Steps with Qt Julien Finet Kitware Inc. Jan. 05 th 2010.
QT Programming QT Programming Ruku Roychowdhury. Background QT is a cross platform application framework. Widely used to develop GUI applications. Originally.
. The ideas behind Qt and a live demo Qt in Education.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
Final Project Presentation
QT – Introduction C++ GUI Programming with Qt 4
Classes, Interfaces and Packages
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
LECTURE 17 GUI Programming. GUI PROGRAMMING Today, we’re going to begin looking at how we can create GUIs (Graphical User Interfaces) in Python. So far,
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
1. 2 Qt Toolkit ● C++ toolkit for cross-platform GUI application development – GUI functions (GUI = graphical user interface) – Data access components,
Examples (D. Schmidt et al)
Passing from design to implementation
OOP What is problem? Solution? OOP
Jonathan Riddell Canonical Kubuntu Ubuntu KDE
Object-Orientated Programming
QT graphical user interface framework
CMPE419 Mobile Application Development
Friday, January 26, 2018 Announcements… For Today… For Next Time…
Mobile Application Development with MeeGo™ - Programming with SDK
Object Oriented Analysis and Design
Qt Programming.
3.3 Abstract Classes, Assignment, and Casting in a Hierarchy
Custom Widgets & Events
Introduction to Data Structure
A multi-platform GUI-building program
CMPE419 Mobile Application Development
A multi-platform GUI-building program
Object Oriented Programming
Presentation transcript:

Lecture 4: Embedded Application Framework Qt Tutorial Cheng-Liang (Paul) Hsieh ECE 424 Embedded Systems Design

W HAT IS QT? A software development framework Qt framework APIs Qt Creator IDE Design and debug Tools and toolchains Simulator, complier, device toolchains Qt is released on 1991 by Trolltech Nokia acquired Trolltech in 2008 Free and open source software to puclic C+ is the primary programming language

H OW DOES Q T IDE LOOK LIKE ?

W HY CHOOSE QT FOR OUR LABS ? Qt is a cross-platform development framework Coding once then porting to any supported platform Qt is language-independent development framework C++ Pythone Jave C# Qt aims at development efficiency. Android aims at system-level resource utilization Plenty of modules are ready in QT and all of them are free to use.

W HY CHOOSE TO MAKE A HEALTH GATEWAY APPLICATION FOR OUR LABS ? Medical devices are known are typical embedded systems Growing telehealth medical devices market Chronic disease Better average life expectancy Telehealth devices’ characteristics Need to be compatible with current networking environment Security function is necessary

H OW TO START ? Qt software Development Kit Qt Reference Useful Books C++ GUI Programming with Qt 4, ISBN: ed.zip An Introduction to Design Patterns in C++ with Qt 4, ISBN: Foundations of Qt Development, ISBN: The Book of Qt 4: The Art of Building Qt Applications, ISBN:

H OW TO START Q T PROGRAMMING ? Step 1: Regain your knowledge about C++ Input and Output Function Pointer, Reference, and Memory access Operator Overloaded function Classes Member access specifier Public Protected Private

H OW TO START Q T PROGRAMMING ? Class examples #ifndef _FRACTION_H_ #define _FRACTION_H_ #include using namespace std; class Fraction { public: void set(int numerator, int denominator); double toDouble() const; string toString() const; private: int m_Numerator; int m_Denominator; }; #endif In you code, you can do followings: Fraction f1,f2; f1.set(1,2); f2.set(3,4); You cannot do followings: f1.m_Numerator=12; f1.m_Denominator=34; But you can assign values to private values through public functions with initial list.

H OW TO START Q T PROGRAMMING ? Step 2: Regain object-oriented programming skill Object Oriented Programming Encapsulation Packaging data Providing well-documented public functions Hiding implementation detail Inheritance Allows different classes to share code Derived class inherits base class and overwirte/extent functions in base class to meet our needs. Polymorphism Virtual function/ Indirect calls/ dynamic binding

H OW TO START Q T PROGRAMMING ? Step 3: Know Qt Modules QtCore Core non-GUI functionality QtGui Extend QtCORE with GUI functionality QtMultimedia Low level multimedia functionality QtNetwork QtOpenGL QtSql QtWebkit

H OW TO START Q T PROGRAMMING ? Step 3.1: Get familiar with QObject Base class in Qt and it works as identities Signals and slots mechanism Inheritance Tree of QObject class

H OW TO START Q T PROGRAMMING ? Step 3.2: Parent-Child relationship One parent object and arbitrary number of children Each QObject parent manages its children The child list establishes a bi-directional association Parent objects should not be confused with base classes

H OW TO START Q T PROGRAMMING ? QWidget The base class of all user interface objects, The widget is the atom of the user interface A widget that is not embedded in a parent widget is called a window.

H OW TO START Q T PROGRAMMING ? Qdialog and QMainWindow QDialog Options and choices Modal or modeless QMainWindow Note: Creating a main window without a central widget is not supported

E XAMPLE : H ELLO Q T ! Code #1 #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *label = new QLabel("Hello Qt!"); label->show(); return app.exec(); }

E XAMPLE : H ELLO Q T ! Code #2: Signal & Slot mechanism #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton *button = new QPushButton("Quit"); QObject::connect(button, SIGNAL(clicked()), &app, SLOT(quit())); button->show(); return app.exec(); }

E XAMPLE : H ELLO Q T ! Code #3: How to combine code#1 and code#2 #include int main (int argc, char *argv[]) { QApplication app(argc, argv); QWidget *window = new QWidget; QLabel *label = new QLabel("Hello QT!"); QPushButton *button = new QPushButton("Quit!"); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(label); layout->addWidget(button); QObject::connect(button, SIGNAL(clicked()),&app,SLOT(quit())); window->setLayout(layout); window->show(); return app.exec(); }

E XAMPLE : H ELLO Q T ! Code #4: “Hello Qt!” by QT Designer