bool QIconView::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: selectionChanged(); break;
    case 1: selectionChanged((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 2: currentChanged((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 3: clicked((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 4: clicked((QIconViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 5: pressed((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 6: pressed((QIconViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 7: doubleClicked((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 8: returnPressed((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 9: rightButtonClicked((QIconViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 10: rightButtonPressed((QIconViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 11: mouseButtonPressed((int)static_QUType_int.get(_o+1),(QIconViewItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 12: mouseButtonClicked((int)static_QUType_int.get(_o+1),(QIconViewItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 13: contextMenuRequested((QIconViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 14: dropped((QDropEvent*)static_QUType_ptr.get(_o+1),(const QValueList<QIconDragItem>&)*((const QValueList<QIconDragItem>*)static_QUType_ptr.get(_o+2))); break;
    case 15: moved(); break;
    case 16: onItem((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 17: onViewport(); break;
    case 18: itemRenamed((QIconViewItem*)static_QUType_ptr.get(_o+1),(const QString&)static_QUType_QString.get(_o+2)); break;
    case 19: itemRenamed((QIconViewItem*)static_QUType_ptr.get(_o+1)); break;
    default:
	return QScrollView::qt_emit(_id,_o);
    }
    return TRUE;
}
void XMLDB::XMLCategoryCollection::addCategory( DB::CategoryPtr category )
{
    m_categories.append( category );
    if (category->isSpecialCategory())
    {
        m_specialCategories[category->type()] = category;
    }
    connect( category.data(), SIGNAL(changed()), this, SIGNAL(categoryCollectionChanged()) );
    connect( category.data(), SIGNAL(itemRemoved(QString)), this, SLOT(itemRemoved(QString)) );
    connect( category.data(), SIGNAL(itemRenamed(QString,QString)), this, SLOT(itemRenamed(QString,QString)) );
    emit categoryCollectionChanged();
}
Example #3
0
void BaseTreeView::slotPropertiesApplied()
{
  if (! propDlg) return;
  // check if renamed
  KURL url = currentURL();
  if (url != propDlg->kurl())
  {
    itemRenamed(url, propDlg->kurl());
  }
  KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
  if (fileInfoDlg && kftvi)
  {
    // has description changed?
    QString newDesc = fileInfoDlg->fileDesc->text();
    if (kftvi->text(1) != newDesc)
      itemDescChanged(kftvi, newDesc);
  }
  BaseTreeViewItem * btvi = dynamic_cast<BaseTreeViewItem *> (kftvi);
  if (btvi)
  {
    btvi->refreshIcon();
  }
/*  not working as expected
  if (kftvi && kftvi->url().isLocalFile()) {
    slotReloadAllTrees();  // refresh the icons for local url's, they might have changed
  }*/
}
bool ListViewEditor::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: itemRenamed((const QString&)static_QUType_QString.get(_o+1)); break;
    default:
	return ListViewEditorBase::qt_emit(_id,_o);
    }
    return TRUE;
}
Example #5
0
void TupItemManager::mouseDoubleClickEvent(QMouseEvent *event)
{
    if (event->buttons() == Qt::LeftButton) {
        QTreeWidgetItem *item = currentItem();
        if (item) {
            if (isFolder(item)) 
                emit itemRenamed(item);    
            else
                emit itemRequired();
        }
    }
}
void DTreeListWidget::closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint )
{
	D_FUNCINFO;
	
	QLineEdit *edit = qobject_cast<QLineEdit *>(editor);
	if ( edit )
	{
		QTreeWidgetItem *item = currentItem();
		if ( item )
		{
			emit itemRenamed(item);
		}
	}
	QTreeWidget::closeEditor(editor, hint);
}
void ListViewEditor::emitItemRenamed( QListViewItem *, int, const QString & text )
{
    emit itemRenamed( text ); // Relay signal ( to QLineEdit )
}
Example #8
0
void TupItemManager::renameItem() 
{
    QTreeWidgetItem *item = currentItem();
    if (item)
        emit itemRenamed(item);
}
int Q3IconView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = Q3ScrollView::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: selectionChanged(); break;
        case 1: selectionChanged((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 2: currentChanged((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 3: clicked((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 4: clicked((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
        case 5: pressed((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 6: pressed((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
        case 7: doubleClicked((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 8: returnPressed((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 9: rightButtonClicked((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
        case 10: rightButtonPressed((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
        case 11: mouseButtonPressed((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Q3IconViewItem*(*)>(_a[2])),(*reinterpret_cast< const QPoint(*)>(_a[3]))); break;
        case 12: mouseButtonClicked((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Q3IconViewItem*(*)>(_a[2])),(*reinterpret_cast< const QPoint(*)>(_a[3]))); break;
        case 13: contextMenuRequested((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1])),(*reinterpret_cast< const QPoint(*)>(_a[2]))); break;
        case 14: dropped((*reinterpret_cast< QDropEvent*(*)>(_a[1])),(*reinterpret_cast< const Q3ValueList<Q3IconDragItem>(*)>(_a[2]))); break;
        case 15: moved(); break;
        case 16: onItem((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 17: onViewport(); break;
        case 18: itemRenamed((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break;
        case 19: itemRenamed((*reinterpret_cast< Q3IconViewItem*(*)>(_a[1]))); break;
        case 20: arrangeItemsInGrid((*reinterpret_cast< const QSize(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
        case 21: arrangeItemsInGrid((*reinterpret_cast< const QSize(*)>(_a[1]))); break;
        case 22: arrangeItemsInGrid((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 23: arrangeItemsInGrid(); break;
        case 24: setContentsPos((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 25: updateContents(); break;
        case 26: doAutoScroll(); break;
        case 27: adjustItems(); break;
        case 28: slotUpdate(); break;
        case 29: movedContents((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        }
        _id -= 30;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = sorting(); break;
        case 1: *reinterpret_cast< bool*>(_v) = sortDirection(); break;
        case 2: *reinterpret_cast< SelectionMode*>(_v) = selectionMode(); break;
        case 3: *reinterpret_cast< int*>(_v) = gridX(); break;
        case 4: *reinterpret_cast< int*>(_v) = gridY(); break;
        case 5: *reinterpret_cast< int*>(_v) = spacing(); break;
        case 6: *reinterpret_cast< ItemTextPos*>(_v) = itemTextPos(); break;
        case 7: *reinterpret_cast< QBrush*>(_v) = itemTextBackground(); break;
        case 8: *reinterpret_cast< Arrangement*>(_v) = arrangement(); break;
        case 9: *reinterpret_cast< ResizeMode*>(_v) = resizeMode(); break;
        case 10: *reinterpret_cast< int*>(_v) = maxItemWidth(); break;
        case 11: *reinterpret_cast< int*>(_v) = maxItemTextLength(); break;
        case 12: *reinterpret_cast< bool*>(_v) = autoArrange(); break;
        case 13: *reinterpret_cast< bool*>(_v) = itemsMovable(); break;
        case 14: *reinterpret_cast< bool*>(_v) = wordWrapIconText(); break;
        case 15: *reinterpret_cast< bool*>(_v) = showToolTips(); break;
        case 16: *reinterpret_cast< uint*>(_v) = count(); break;
        }
        _id -= 17;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 2: setSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break;
        case 3: setGridX(*reinterpret_cast< int*>(_v)); break;
        case 4: setGridY(*reinterpret_cast< int*>(_v)); break;
        case 5: setSpacing(*reinterpret_cast< int*>(_v)); break;
        case 6: setItemTextPos(*reinterpret_cast< ItemTextPos*>(_v)); break;
        case 7: setItemTextBackground(*reinterpret_cast< QBrush*>(_v)); break;
        case 8: setArrangement(*reinterpret_cast< Arrangement*>(_v)); break;
        case 9: setResizeMode(*reinterpret_cast< ResizeMode*>(_v)); break;
        case 10: setMaxItemWidth(*reinterpret_cast< int*>(_v)); break;
        case 11: setMaxItemTextLength(*reinterpret_cast< int*>(_v)); break;
        case 12: setAutoArrange(*reinterpret_cast< bool*>(_v)); break;
        case 13: setItemsMovable(*reinterpret_cast< bool*>(_v)); break;
        case 14: setWordWrapIconText(*reinterpret_cast< bool*>(_v)); break;
        case 15: setShowToolTips(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 17;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 17;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}