Changeset b574c383b7 in tspsg for src/mainwindow.cpp
- Timestamp:
- Apr 20, 2010, 5:51:04 PM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- 345e7b6132
- Parents:
- 317ba0432e
- git-author:
- Oleksii Serdiuk <contacts@…> (04/20/10 17:51:04)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:41:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mainwindow.cpp
r317ba0432e rb574c383b7 38 38 loadLanguage(); 39 39 setupUi(); 40 setAcceptDrops(true); 40 41 41 42 initDocStyleSheet(); … … 734 735 } 735 736 737 void MainWindow::dragEnterEvent(QDragEnterEvent *ev) 738 { 739 if (ev->mimeData()->hasUrls() && (ev->mimeData()->urls().count() == 1)) { 740 QFileInfo fi(ev->mimeData()->urls().first().toLocalFile()); 741 if ((fi.suffix() == "tspt") || (fi.suffix() == "zkt")) 742 ev->acceptProposedAction(); 743 } 744 } 745 746 void MainWindow::dropEvent(QDropEvent *ev) 747 { 748 if (maybeSave() && tspmodel->loadTask(ev->mimeData()->urls().first().toLocalFile())) { 749 setFileName(ev->mimeData()->urls().first().toLocalFile()); 750 tabWidget->setCurrentIndex(0); 751 setWindowModified(false); 752 solutionText->clear(); 753 toggleSolutionActions(false); 754 755 ev->acceptProposedAction(); 756 } 757 } 758 736 759 bool MainWindow::hasUpdater() const 737 760 {
Note: See TracChangeset
for help on using the changeset viewer.