Subversion Repositories tpanel

Rev

Rev 215 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 215 Rev 217
Line 97... Line 97...
97
            // If this widgets are deleted, Qt deletes their children.
97
            // If this widgets are deleted, Qt deletes their children.
98
            case OBJ_PAGE:
98
            case OBJ_PAGE:
99
            case OBJ_SUBPAGE:
99
            case OBJ_SUBPAGE:
100
                if (obj->object.widget)
100
                if (obj->object.widget)
101
                {
101
                {
102
                    obj->object.widget->close();        // This deletes all childs and the window itself
102
                    obj->object.widget->close();        // This deletes all childs and the widget itself
103
                    obj->object.widget = nullptr;
103
                    obj->object.widget = nullptr;
104
                }
104
                }
105
            break;
105
            break;
106
 
106
 
107
            case OBJ_VIDEO:
107
            case OBJ_VIDEO:
Line 414... Line 414...
414
    {
414
    {
415
        if (obj->remove && (!obj->animation || obj->animation->state() != QAbstractAnimation::Running))
415
        if (obj->remove && (!obj->animation || obj->animation->state() != QAbstractAnimation::Running))
416
        {
416
        {
417
            if (obj->type == OBJ_SUBPAGE && obj->object.widget)
417
            if (obj->type == OBJ_SUBPAGE && obj->object.widget)
418
            {
418
            {
419
                delete obj->object.widget;
419
                obj->object.widget->close();
420
                obj->object.widget = nullptr;
420
                obj->object.widget = nullptr;
421
            }
421
            }
422
 
422
 
423
            if (!prev)
423
            if (!prev)
424
            {
424
            {
Line 439... Line 439...
439
        obj = obj->next;
439
        obj = obj->next;
440
    }
440
    }
441
 
441
 
442
    mutex_obj.unlock();
442
    mutex_obj.unlock();
443
}
443
}
-
 
444
 
-
 
445
void TObject::invalidateAllObjects()
-
 
446
{
-
 
447
    DECL_TRACER("TObject::invalidateAllObjects()");
-
 
448
 
-
 
449
    mutex_obj.lock();
-
 
450
    OBJECT_t *obj = mObject;
-
 
451
 
-
 
452
    while (obj)
-
 
453
    {
-
 
454
        obj->object.vwidget = nullptr;      // Because it's a union all types will be NULL
-
 
455
        obj->remove = true;
-
 
456
        obj->animation = nullptr;
-
 
457
 
-
 
458
        obj = obj->next;
-
 
459
    }
-
 
460
 
-
 
461
    mutex_obj.unlock();
-
 
462
}
-
 
463
 
-
 
464
void TObject::invalidateAllSubObjects(ulong handle)
-
 
465
{
-
 
466
    DECL_TRACER("::invalidateAllSubObjects(ulong handle)");
-
 
467
 
-
 
468
    mutex_obj.lock();
-
 
469
    OBJECT_t *obj = mObject;
-
 
470
 
-
 
471
    while (obj)
-
 
472
    {
-
 
473
        if (obj->handle != handle && (obj->handle & 0xffff0000) == handle)
-
 
474
        {
-
 
475
            obj->object.vwidget = nullptr;  // Because it's a union all types will be NULL
-
 
476
            obj->remove = true;
-
 
477
            obj->animation = nullptr;
-
 
478
        }
-
 
479
 
-
 
480
        obj = obj->next;
-
 
481
    }
-
 
482
 
-
 
483
    mutex_obj.unlock();
-
 
484
}
444
 
485
 
445
string TObject::objectToString(TObject::OBJECT_TYPE o)
486
string TObject::objectToString(TObject::OBJECT_TYPE o)
446
{
487
{
447
    switch(o)
488
    switch(o)
448
    {
489
    {