This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
About.py
60 lines (53 loc) · 2.25 KB
/
About.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- coding: utf-8 -*-
"""
/***************************************************************************
Instagram to Qgis
A QGIS plugin
Search and downloading Instagram images and create a point shapefile with them.
-------------------
begin : 2016-03-13
copyright : (C) 2016 All4Gis.
email : franka1986@gmail.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation either version 2 of the License, or *
# any later version. *
* *
***************************************************************************/
"""
import os.path
import subprocess
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from gui.generated.About import Ui_About
from qgis.core import *
from qgis.gui import *
try:
import sys
from pydevd import *
except:
pass
class AboutDialog(QDialog, Ui_About):
def __init__(self, iface):
QDialog.__init__(self)
self.setupUi(self)
self.iface = iface
self.plugin_dir = os.path.dirname(__file__)
self.video = self.plugin_dir + '//example//ExampleUse.mp4'
# Video de ejemplo
def ShowVideo(self):
if os.path.exists(self.video):
if sys.platform.startswith('dar'):
subprocess.call(['open', self.video])
elif sys.platform.startswith('lin'):
subprocess.call(['xdg-open', self.video])
elif sys.platform.startswith('win'):
os.startfile(self.video)
else:
pass
else:
self.iface.messageBar().pushMessage("Error: ", "Could not open video file: " + self.video, level=QgsMessageBar.CRITICAL, duration=3)
return