Ejemplo n.º 1
0
/*!
    Returns the application global Q3SqlPropertyMap.
*/
Q3SqlPropertyMap * Q3SqlPropertyMap::defaultMap()
{
    if(defaultmap == 0){
        defaultmap = new Q3SqlPropertyMap();
        qsql_cleanup_property_map.add(&defaultmap);
    }
    return defaultmap;
}
Ejemplo n.º 2
0
Q3EditorFactory * Q3EditorFactory::defaultFactory()
{
    if(defaultfactory == 0){
        defaultfactory = new Q3EditorFactory();
        q_cleanup_editor_factory.add(&defaultfactory);
    }

    return defaultfactory;
}
Ejemplo n.º 3
0
/*!
    Replaces the global default property map with \a map. All
    Q3DataTable and Q3SqlForm instantiations will use this new map for
    inserting and extracting values to and from editors.
    \e{Q3SqlPropertyMap takes ownership of \a map, and destroys it
    when it is no longer needed.}
*/
void Q3SqlPropertyMap::installDefaultMap(Q3SqlPropertyMap * map)
{
    if(map == 0) return;

    if(defaultmap != 0){
        qsql_cleanup_property_map.remove(&defaultmap);
        delete defaultmap;
    }
    defaultmap = map;
    qsql_cleanup_property_map.add(&defaultmap);
}
Ejemplo n.º 4
0
void Q3EditorFactory::installDefaultFactory(Q3EditorFactory * factory)
{
    if(factory == 0 || factory == defaultfactory) return;

    if(defaultfactory != 0){
        q_cleanup_editor_factory.remove(&defaultfactory);
        delete defaultfactory;
    }
    defaultfactory = factory;
    q_cleanup_editor_factory.add(&defaultfactory);
}