Dialogue Sub-Views

Involved development of the OpenMW construction set.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

Type_Cells is for the cell table. You want an individual cell. That would be Type_Cell.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

right, thanks.

Image
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

Image
Do we want non editable fields disabled?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

That is a good question. Disabling the fields seems like the obvious solution, but with many GUI-framework/skins disabled widgets are a bit hard to read. Maybe consider using a plain label instead?
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

Actually i can't do that, because for some reason qlabel has problem with delegate. But i can disable editing on qlinedits (no changing apperance).
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

Hm, not sure what to do about that. Using a disabled QLineEdit without any visual indicator is likely to confuse the user.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

I agree, but i consider it to be a detail that can be adressed at later stage. What bothers me right now is actual data storing.
- If possible the delegates from the table view should be re-used.
I don't get this point. Why do not use makeDelegate:
CSVWorld::CommandDelegate *CSVWorld::CommandDelegateFactoryCollection::makeDelegate (
CSMWorld::ColumnBase::Display display, QUndoStack& undoStack, QObject *parent) const
{
std::map<CSMWorld::ColumnBase::Display, CommandDelegateFactory *>::const_iterator iter =
mFactories.find (display);

if (iter!=mFactories.end())
return iter->second->makeDelegate (undoStack, parent);

return new CommandDelegate (undoStack, parent);
}
Handling sharing delegates looks like task involving additional cases and many potential bugs in the future for very small gain.

BTW
It seems that Display_RecordState column is editable.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

With re-use I mean re-use the Delegate classes.

The RecordState is editable, which is correct, because it can be changed; just not directly by the user, which is why it is not user editable.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

that makes sense.

Next question: could you please tell me how do we handle global variable type? Var types are:
static const char *sVarTypeEnums[] =
{
"unknown", "none", "short", "integer", "long", "float", "string", 0
};

but globals are displayed as short, long or float.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

This is a list for all types, that can be used in situations where more than one type is possible. Globals variables only use a subset of these. The respective VarTypeDelegate is configured with a list of the types that are available in the context (Short, Long and Float for globals).
Post Reply