Changeset 372 for trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp
- Timestamp:
- Dec 2, 2009, 4:30:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp
r2 r372 328 328 hideMenu(index); 329 329 330 330 331 QDrag *drag = new QDrag(this); 331 332 drag->setPixmap(ActionRepositoryMimeData::actionDragPixmap(action)); 332 333 drag->setMimeData(new ActionRepositoryMimeData(action, Qt::MoveAction)); 334 333 335 334 336 const int old_index = m_currentIndex; 335 337 m_currentIndex = -1; 336 338 339 337 340 if (drag->start(Qt::MoveAction) == Qt::IgnoreAction) { 341 342 343 338 344 InsertActionIntoCommand *cmd = new InsertActionIntoCommand(fw); 339 345 cmd->init(this, action, safeActionAt(index)); … … 629 635 void QDesignerMenuBar::dragEnterEvent(QDragEnterEvent *event) 630 636 { 637 631 638 const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData()); 632 639 if (!d || d->actionList().empty()) { … … 650 657 break; 651 658 } 659 652 660 } 653 661 654 662 void QDesignerMenuBar::dragMoveEvent(QDragMoveEvent *event) 655 663 { 664 656 665 const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData()); 657 666 if (!d || d->actionList().empty()) { … … 674 683 break; 675 684 } 685 676 686 } 677 687 … … 687 697 m_dragging = false; 688 698 699 689 700 if (const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData())) { 690 701 … … 707 718 } 708 719 event->ignore(); 720 709 721 } 710 722
Note:
See TracChangeset
for help on using the changeset viewer.