• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 8 pages
Exam (elaborations)

COS 2614 assignment 3 solutions

Document preview thumbnail
Preview 2 out of 8 pages

4.1 Question 1 The aim of this question is to expand your knowledge of Graphical User Interface programming by including menus on the user interface as well as using QActions for event handling. Some comments on this solution: • Each edit option (Bold, Underline and Italics) is included on the edit menu, where each option is added as a QAction. • In order to apply an edit option on a given text, firstly select the text in the text edit and then choose an edit option. • Event handling code for the edit options are grouped in the actionEvent()function. • Note that the text edit is a data member of the class, whereas the edit menu is just a local variable of the constructor. This is because we want to make the text edit accessible to the actionEvent() slot triggered by the menu options. 4 In general, it is better to keep as many widgets as possible as local variables of the constructor (or setupGUI() function), and only make those that need to be accessed by other slots and member functions, data members. • Note that the text edit provides an undo facility. This works, not only for typing, but also for formatting actions. Given below are two sample screen prints of the program while it is running: 4.2 Question 2 The aim of this question is to introduce you to the Qt class QMap. Given below is a screen capture of the output produced by the program when running: Some comments on this solution: • We have separated the class definitions and implementations of Textbook and TextbookMap into separate header and cpp files respectively. • Ezust did not provide an implementation of the Textbook class. So you had to implement Textbook according the given definition. • QMap only allows direct lo


Document information

Uploaded on
September 17, 2021
Number of pages
8
Written in
2021/2022
Type
Exam (elaborations)
Contains
Unknown
$3.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
1416
Followers
669
Items
1140
Last sold
6 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.