00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 TGo4FitSlot * QFitSlotWidget::GetSlot() {
00025 return dynamic_cast<TGo4FitSlot*> (GetObject());
00026 }
00027
00028 void QFitSlotWidget::FillSpecificData() {
00029 setAcceptDrops(TRUE);
00030 QFitNamedWidget::FillSpecificData();
00031 TGo4FitSlot* slot = GetSlot();
00032 if (slot) {
00033 NameEdt->setReadOnly(TRUE);
00034 NameEdt->setDisabled(TRUE);
00035
00036 InfoLbl->setText(QString("Slot of: ")+slot->GetOwner()->GetName() +
00037 ", dedicated for:" + slot->GetClass()->GetName() + " class");
00038 InfoLbl->adjustSize();
00039
00040 if (slot->GetObject()) {
00041 ObjectLbl->setText(QString("Object: ")+slot->GetObjectName() +
00042 ", of class: " + slot->GetObject()->ClassName());
00043 if(slot->GetOwned()) OwnershipLbl->setText("Object owned by slot");
00044 else OwnershipLbl->setText("Object not owned by slot");
00045 } else {
00046 ObjectLbl->setText("No object in slot");
00047 OwnershipLbl->setText("");
00048 }
00049 ObjectLbl->adjustSize();
00050 OwnershipLbl->adjustSize();
00051
00052 RequirementChk->setChecked(slot->GetNeeded());
00053 SaveCmb->setCurrentItem(slot->GetSaveFlag());
00054
00055 QString info;
00056 fxSlots->Wiz_GetSlotSourceInfo(slot, &info);
00057 SourceLbl->setText(QString("Source: ") + info);
00058 SourceLbl->adjustSize();
00059 }
00060 }
00061
00062 void QFitSlotWidget::RequirementChk_toggled( bool req)
00063 {
00064 if(!fbFillWidget && GetSlot())
00065 GetSlot()->SetNeeded(req);
00066 }
00067
00068
00069 void QFitSlotWidget::SaveCmb_activated( int typ )
00070 {
00071 if(!fbFillWidget && GetSlot())
00072 GetSlot()->SetSaveFlag(typ);
00073 }
00074
00075 void QFitSlotWidget::dragEnterEvent( QDragEnterEvent * Event ) {
00076 fxSlots->DragEnterEvent(Event);
00077 }
00078
00079 void QFitSlotWidget::dragMoveEvent(QDragMoveEvent * Event) {
00080 if ( QTextDrag::canDecode(Event) && GetItem())
00081 fxSlots->DragMoveEvent(GetItem()->Object(), GetItem()->ObjectType(), Event);
00082 else
00083 Event->ignore();
00084 }
00085
00086 void QFitSlotWidget::dropEvent( QDropEvent * Event ) {
00087 fxSlots->DropEvent(GetItem()->Object(), GetItem()->ObjectType(), Event, GetItem());
00088 }
00089
00090