Browse the code
| Revision log Information on the revision | |
|---|---|
| Revision: | 362 (differences) |
| Author: | marmotte007 |
| Log message: |
setup-py2exe.py Dernière version du fichier (compilation/création de la version portable pour windows). La compilation semble maintenant bien mieux fonctionner sous windows seven. Il est d'ailleurs recommandé d'effectuer la compilation sous windows seven. |
| Change revision: | |
0
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of ekd - Sound module # Copyright (C) 2007-2009 Olivier Ponchaut <opvg@edpnet.be> # 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 # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import os from PyQt4.QtCore import * from PyQt4.QtGui import * from music_son_base_sox import choixSonSortieWidget ############### from moteur_modules_common.EkdCompatiblePython2Et3 import EkdPrint ############### class selectJoinMultipleSound(QWidget) : def __init__(self, exp=1, parent=None) : QWidget.__init__(self) self.parent=parent self.exp=exp self.setupUi() self.lastdir = os.path.expanduser("~") self.connect(self.upSoundFile, SIGNAL("clicked()"), self.setUpFile) self.connect(self.downSoundFile, SIGNAL("clicked()"), self.setDownFile) def addSoundAction(self, files) : for fichier in files : if not len(self.lstSoundFile.findItems(fichier, Qt.MatchExactly)) > 0 : self.lstSoundFile.addItem(fichier) self.checkValid() def checkValid(self) : if self.lstSoundFile.count() > 0 : self.parent.boutApp.setEnabled(True) else : self.parent.boutApp.setEnabled(False) def setUpFile(self) : z = self.lstSoundFile.currentRow() if z > 0 : self.lstSoundFile.insertItem(z-1,QListWidgetItem(self.lstSoundFile.takeItem(z))) self.lstSoundFile.setCurrentRow(z-1) def delFile(self,files) : if len(files) == 0 : self.lstSoundFile.clear() else : x=0 while x < self.lstSoundFile.count() : if unicode(self.lstSoundFile.item(x).text()) not in files : self.lstSoundFile.takeItem(x) x += 1 self.checkValid() def setDownFile(self) : z = self.lstSoundFile.currentRow() if z < self.lstSoundFile.count()-1 : self.lstSoundFile.insertItem(z+1,QListWidgetItem(self.lstSoundFile.takeItem(z))) self.lstSoundFile.setCurrentRow(z+1) def getListFile(self) : if self.lstSoundFile.count() > 0 : lst = [] x = 0 while x < self.lstSoundFile.count() : qsfile = self.lstSoundFile.item(x).text() lst.append(unicode(qsfile.toUtf8(),"utf-8")) x += 1 return lst else : return None def getFileExt(self) : EkdPrint(unicode(self.choixFormatAudio.formatSound.currentText())) return unicode(self.choixFormatAudio.formatSound.currentText()) def getNumFile(self) : return self.lstSoundFile.count() def setupUi(self): self.setObjectName("joinmsound") verticalLayout_3 = QVBoxLayout() verticalLayout_3.setObjectName("verticalLayout_3") if self.exp : self.choixFormatAudio = choixSonSortieWidget(self) verticalLayout_3.addWidget(self.choixFormatAudio) self.groupBox_2 = QGroupBox() self.groupBox_2.setObjectName("groupBox_2") self.verticalLayout_2 = QVBoxLayout(self.groupBox_2) self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.lstSoundFile = QListWidget(self.groupBox_2) self.lstSoundFile.setSelectionBehavior(QAbstractItemView.SelectItems) self.lstSoundFile.setViewMode(QListView.ListMode) self.lstSoundFile.setModelColumn(0) self.lstSoundFile.setObjectName("lstSoundFile") self.horizontalLayout_2.addWidget(self.lstSoundFile) self.verticalLayout = QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.upSoundFile = QToolButton(self.groupBox_2) self.upSoundFile.setIcon(QIcon(u"Icones"+os.sep+u"haut.png")) self.upSoundFile.setObjectName("upSoundFile") self.verticalLayout.addWidget(self.upSoundFile) self.downSoundFile = QToolButton(self.groupBox_2) self.downSoundFile.setIcon(QIcon(u"Icones"+os.sep+u"bas.png")) self.downSoundFile.setObjectName("downSoundFile") self.verticalLayout.addWidget(self.downSoundFile) spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem1) self.horizontalLayout_2.addLayout(self.verticalLayout) self.verticalLayout_2.addLayout(self.horizontalLayout_2) verticalLayout_3.addWidget(self.groupBox_2) self.setLayout(verticalLayout_3) self.retranslateUi() def setTitleAndTips(self, text1, text2=None) : if text2==None : text2 = text1 self.groupBox_2.setTitle(text1) self.lstSoundFile.setToolTip(text2) def retranslateUi(self): self.groupBox_2.setTitle(_(u"Liste des fichiers à joindre")) self.lstSoundFile.setToolTip(_(u"Liste des fichiers son à joindre. <b>Pour information, vous pouvez monter et déscendre les fichiers grâce à la flèche haut et bas (les fichiers apparaissant en haut de la liste sont ceux qui seront au début du montage).</b>")) self.upSoundFile.setToolTip(_(u"Monter la ligne sélectionnée")) self.upSoundFile.setText(_(u"...")) self.downSoundFile.setToolTip(_(u"Descendre la ligne sélectionnée")) self.downSoundFile.setText(_(u"..."))

EKD