Download presentation
Presentation is loading. Please wait.
Published byTrevor Stokes Modified over 9 years ago
1
SE-3910 Real-time Systems Week 7, Class 1 – Announcement – GStreamer – Bins Boardshots – QT Swing & Qt Signals & Slots – Code – Example SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling, Some from Dr. Hornick, etc. 1
2
Review? What is a C MACRO? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 2
3
GUI Toolkits Java – AWT – Swing C/C++ – Qt – FLTK – GTK – Motif – MFC SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 3
4
What makes a good toolkit? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 4
5
Qt Features Fully object-oriented Consistent interfaces Rich set of widgets (controls) Have native look and feel Drag and drop Customizable appearance Utility classes OpenGL support Network support Database support Plugin support Unicode/Internationaliz ation support GUI builder SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 5
6
Qt Widgets Java Swing Qt SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 6
7
Example QT Widgets SE3910 Real Time Systems
8
QT Built in Dialog Boxes File dialog Font dialog Color dialog Printer dialog SE3910 Real Time Systems
9
Layouts Java – FlowLayout – GridLayout – BorderLayout Qt – Flow Layout Flow Layout – Grid Layout – Horizontal – Vertical – Border Layout Border Layout SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 9
10
Events/Signals Java – Event E.g. ActionEvent – Event Listener E.g. ActionListener – How do you initiate an event in Java? Qt – Signal E.g. – Slot E.g. on_pushButton_clicked – emit SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 10
11
Custom Events in Java How do you register an event with an event source in Java? How do you create your own event in Java? How do you fire an event in java? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 11
12
Custom Events in QT How do you register an event with an event source in QT? connect(button, SIGNAL(clicked()), qApp, SLOT(quit())); How do you create your own event in QT? signals: void clicked(); How do you fire an event in QT? emit progressNotification(1000 * seconds); SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 12
13
Qt command-line tools… moc – Program to convert.h files to moc_....cpp files qmake - Program that automatically creates a makefile to run moc and gcc at the correct time SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 13
14
Demo – Connecting to Beaglebone [TODO] – Perhaps another time! – I may eventually put instructions for setting up a DHCP server on your laptop using “connection sharing” on website under “Objectives” – Ask me if you don’t find it when you need it – You know my number. SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 14
15
Demo – Watchdog One prompt for i in `seq 0 1000`; do echo $(($i*10)); sleep 10; done; Another cat > /dev/watchdog SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling 15
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.