mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
SqlCtrl: new SqlNOption similar to SqlOption, but returns Null on flase (instead of ''0'')
git-svn-id: svn://ultimatepp.org/upp/trunk@3458 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
14c88df963
commit
9e0debc328
3 changed files with 16 additions and 0 deletions
|
|
@ -54,6 +54,12 @@ Value SqlOption::GetData() const {
|
|||
return Get() ? "1" : "0";
|
||||
}
|
||||
|
||||
Value SqlNOption::GetData() const
|
||||
{
|
||||
if(Get()) return "1";
|
||||
return Null;
|
||||
}
|
||||
|
||||
void SqlCtrls::Add(SqlId id, Ctrl& ctrl) {
|
||||
Item& m = item.Add();
|
||||
m.id = id;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ public:
|
|||
virtual Value GetData() const;
|
||||
};
|
||||
|
||||
class SqlNOption : public SqlOption {
|
||||
virtual Value GetData() const;
|
||||
};
|
||||
|
||||
class SqlArray : public ArrayCtrl {
|
||||
public:
|
||||
virtual void SetData(const Value& v);
|
||||
|
|
|
|||
|
|
@ -8,3 +8,9 @@ ctrl SqlOption {
|
|||
>Option;
|
||||
GetStdSize() { sz = GetMinSize(); sz.cx *= 8; sz.cy = max(16, sz.cy); return sz; }
|
||||
}
|
||||
|
||||
ctrl SqlNOption {
|
||||
group "Push";
|
||||
>Option;
|
||||
GetStdSize() { sz = GetMinSize(); sz.cx *= 8; sz.cy = max(16, sz.cy); return sz; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue