Introduce InitialOption struct
addDockWidget() received a AddingOption enumerator. But that enum isn't enough, as we also want to be able to specify an initial QSize. So, instead of adding yet another parameter to addDockWidget(), we create a struct to old those "initial settings". Implies a minor source break, but trivial to fix in user code, just rename the enumerator. Honouring preferredSize will be a followup. Needed for issue #95
This commit is contained in:
@@ -71,7 +71,7 @@ public:
|
||||
void addWidget(QWidgetOrQuick *widget, KDDockWidgets::Location location,
|
||||
Frame *relativeTo = nullptr,
|
||||
Layouting::Item::DefaultSizeMode = Layouting::Item::DefaultSizeMode::Fair,
|
||||
AddingOption option = {});
|
||||
InitialOption option = {});
|
||||
|
||||
/**
|
||||
* Adds an entire MultiSplitter into this layout. The donor MultiSplitter will be deleted
|
||||
@@ -234,7 +234,7 @@ private:
|
||||
|
||||
// For debug/hardening
|
||||
bool validateInputs(QWidgetOrQuick *widget, KDDockWidgets::Location location,
|
||||
const Frame *relativeToFrame, AddingOption option) const;
|
||||
const Frame *relativeToFrame, InitialOption option) const;
|
||||
|
||||
/**
|
||||
* @brief Removes unneeded placeholder items when adding new frames.
|
||||
|
||||
Reference in New Issue
Block a user