| 1768 | } |
| 1769 | |
| 1770 | void MainWindow::dropEvent(QDropEvent *event) |
| 1771 | { |
| 1772 | qDebug(log) << "dropEvent"; |
| 1773 | bool bRet = false; |
| 1774 | if(!event->mimeData()->hasUrls()) |
| 1775 | return; |
| 1776 | auto urls = event->mimeData()->urls(); |
| 1777 | foreach(auto url, urls) |
| 1778 | { |
| 1779 | if(url.isLocalFile()) |
| 1780 | slotOpenFile(url.toLocalFile()); |
| 1781 | bRet = true; |
| 1782 | } |
| 1783 | if(bRet) |
| 1784 | event->accept(); |
| 1785 | else |
| 1786 | event->ignore(); |
| 1787 | } |
| 1788 | |
| 1789 | void MainWindow::slotSystemTrayIconActivated(QSystemTrayIcon::ActivationReason reason) |
| 1790 | { |