Skip to content

QtFRED dialogs: consistent reusable attributes and handlers #6458

Open
@Goober5000

Description

@Goober5000

From PR #6322, in regards to void ShipCustomWarpDialog::rejectHandler():

This seems like a common enough pattern that it should be in the superclass or in a utility function somewhere, though maybe that's beyond the scope of this PR.

And also in regards to void ShipCustomWarpDialog::startSoundChanged():

The string wrangling should definitely be in a utility function. If you want to do that in a different PR that's fine; but if string wrangling is necessary, then there should be qtFRED-wide utility functions for converting from Qstring to std::string and vice versa.

More generally, it would be useful to reuse code as much as possible in qtFRED, since a lot of the dialogs involve a lot of boilerplate. Templates and pointers-to-members could help here, so for example a simple get/set of an attribute could use templated logic that applies for all such simple fields in the dialog.

Metadata

Metadata

Assignees

Labels

qtfredA feature or issue related to qtFred.refactorA cleanup/restructure of a feature for speed, simplicity, and/or maintainability

Type

No type

Projects

Status

Open Tasks

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions