Basic Image Viewer

Basic Image Viewer

 

Assignment Requirements

1. Main Window Design

• Create a main window class inheriting from QMainWindow

• Set window title to "Basic Image Viewer - [Your Name]"

• Set fixed window size (recommended 600x400)

• The central image display area should automatically adapt to image size while maintaining original aspect ratio

2. Menu Bar Design

• File menu:

  - Open Image (Ctrl+O shortcut)

  - Exit (Ctrl+Q shortcut)

• Help menu:

  - About (displays about dialog)

3. Toolbar Design

• Functional buttons:

  - Open Image

  - Separator

  - Image Info (displays basic image information)

• Visual elements:

  - Appropriate icons (can use built-in Qt icons)

  - Tooltip text for all buttons

4. Central Display Area

• Implementation:

  - Use QLabel as display widget

  - Support JPG, PNG, BMP formats

• Display properties:

  - Maintain original aspect ratio

  - Auto-scrollbars for large images

5. Dialog Implementation

• Open File Dialog:

  - QFileDialog implementation

  - Image format filter (*.jpg *.png *.bmp)

• About Dialog:

  - Custom QDialog

  - Shows app name, version, author info

6. Status Bar Features

Display the following information:

• Current image filename

• Image dimensions (width x height)

• Image format type

Submission Requirements

1. Source Code

• Complete Qt project

• Include .pro file

2. Written Report (docx)

• Program feature description

• Challenges and solutions

• Interface screenshot

3. Packaging

• Zip file format

• Naming convention: Name_StudentID_QtImageViewer.zip

Key Assessment Points

Functionality (60%)

• Image display capability

• Menu/toolbar functions

• Status bar information

Code Quality (30%)

• Structure and organization

• Naming conventions

• Documentation

Interface (10%)

• Control layout

• User experience

发表评论

电子邮件地址不会被公开。 必填项已用*标注