##
## You should have received a copy of appropriate licenses along with this
## package. If not, see <http://www.syntext.com/legal/>. If you are unsure
## which license is appropriate for your use, please contact the sales
## department at [email protected].
##
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
import os, sys

from ui import build_ui_widgets
from PyQt4.QtCore import Qt, QFileInfo
from PyQt4.QtGui import QApplication, QMessageBox, QFileDialog

Ui_OptionsDialog, DialogBase = build_ui_widgets("DitaOtOptionsDialog")


class DitaOtOptionsDialog(Ui_OptionsDialog, DialogBase):
    def __init__(self, publisher, parentWidget=None):
        DialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("DitaOtOptionsDialog")
        # This flag is needed for correct non-modality working in MacOSX
        flags = self.windowFlags() | Qt.Tool
        self.setWindowFlags(flags)
        self._propMap = { 'antScript': { \
                             'edit': self.antScriptLineEdit_,
                             'view': self.antScriptLabel_ },
                          'antMakefile':  { \
                             'edit': self.antMakefileLineEdit_,
## GPL_EXCEPTION.txt in this package.
## 
## You should have received a copy of appropriate licenses along with this 
## package. If not, see <http://www.syntext.com/legal/>. If you are unsure
## which license is appropriate for your use, please contact the sales 
## department at [email protected].
## 
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
## 
from ui             import build_ui_widgets
from PyQt4.QtCore   import Qt
from PyQt4.QtGui    import QApplication, QFileDialog

Ui_SimplePublishOptionsDialog, \
    SimpleDialogBase = build_ui_widgets("SimplePublishOptionsDialog.ui")

class SimplePublishOptionsDialog(Ui_SimplePublishOptionsDialog,
                                 SimpleDialogBase):
    def __init__(self, publisher, parentWidget=None):
        SimpleDialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("SimplePublishOptionsDialog")
        self.scriptLineEdit_.setText(publisher.script)
        self.xslLineEdit_.setText(publisher.stylesheet)

    def getProperty(self, prop):
        if 'script' == prop:
            return unicode(self.scriptLineEdit_.text())
        elif 'stylesheet' == prop:
            return unicode(self.xslLineEdit_.text())
## 
## You should have received a copy of appropriate licenses along with this 
## package. If not, see <http://www.syntext.com/legal/>. If you are unsure
## which license is appropriate for your use, please contact the sales 
## department at [email protected].
## 
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
## 
import os, sys

from ui             import build_ui_widgets
from PyQt4.QtCore   import Qt, QFileInfo
from PyQt4.QtGui    import QApplication, QMessageBox, QFileDialog

Ui_OptionsDialog, DialogBase = build_ui_widgets("DitaOtOptionsDialog")

class DitaOtOptionsDialog(Ui_OptionsDialog, DialogBase):
    def __init__(self, publisher, parentWidget=None):
        DialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("DitaOtOptionsDialog")
        # This flag is needed for correct non-modality working in MacOSX
        flags = self.windowFlags() | Qt.Tool
        self.setWindowFlags(flags)
        self._propMap = { 'antScript': { \
                             'edit': self.antScriptLineEdit_,
                             'view': self.antScriptLabel_ },
                          'antMakefile':  { \
                             'edit': self.antMakefileLineEdit_,
                             'view': self.antMakefileLabel_ },
Example #4
0
## department at [email protected].
## 
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
## 
import os, sys, re

from ui             import build_ui_widgets
from PyQt4          import QtCore
from PyQt4.QtCore   import Qt, QProcess, QTimer, QTimeLine
from PyQt4.QtGui    import QGroupBox, QTextEdit, QVBoxLayout, QHBoxLayout, \
                           QGridLayout, QSpacerItem, QSizePolicy
from utils          import dump_ptree, PublishException
from SernaApi       import XpathExpr, Grove

Ui_ProgressDialog, DialogBase = build_ui_widgets("ProgressDialog")

class ProgressDialog(Ui_ProgressDialog, DialogBase):
    def __init__(self, publisher, plugin, parentWidget=None):
        DialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("ProgressDialog")
        self.viewButton_.setEnabled(False)

        self._publisher = publisher
        self._plugin = plugin
	self._parent = parentWidget
        self._cancelled = False
        self._timeline = QTimeLine(1000*60, self)
        self._timeline.setFrameRange(0, 2*60)
        self._timeline.setLoopCount(0)
Example #5
0
## which license is appropriate for your use, please contact the sales
## department at [email protected].
##
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
import os, sys

from ui import build_ui_widgets
from PyQt4.QtCore import Qt, QFileInfo
from PyQt4.QtGui import QApplication, QMessageBox, QFileDialog
from utils import dump_ptree

from dialogs.ProgressDialog import ProgressDialog

Ui_PublishDialog, DialogBase = build_ui_widgets("PublishDialog")


class PublishDialog(Ui_PublishDialog, DialogBase):
    def __init__(self, plugin, parentWidget=None, props=None):
        DialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("PublishDialog")

        self._plugin = plugin
        self._props = props

        self._publishers = {}

        sernaDoc = self._plugin.sernaDoc()
        self._dsi = sernaDoc.getDsi()
Example #6
0
## GPL_EXCEPTION.txt in this package.
##
## You should have received a copy of appropriate licenses along with this
## package. If not, see <http://www.syntext.com/legal/>. If you are unsure
## which license is appropriate for your use, please contact the sales
## department at [email protected].
##
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
from ui import build_ui_widgets
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QApplication, QFileDialog

Ui_SimplePublishOptionsDialog, \
    SimpleDialogBase = build_ui_widgets("SimplePublishOptionsDialog.ui")


class SimplePublishOptionsDialog(Ui_SimplePublishOptionsDialog,
                                 SimpleDialogBase):
    def __init__(self, publisher, parentWidget=None):
        SimpleDialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("SimplePublishOptionsDialog")
        self.scriptLineEdit_.setText(publisher.script)
        self.xslLineEdit_.setText(publisher.stylesheet)

    def getProperty(self, prop):
        if 'script' == prop:
            return unicode(self.scriptLineEdit_.text())
        elif 'stylesheet' == prop:
Example #7
0
## department at [email protected].
##
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
import os, sys, re

from ui import build_ui_widgets
from PyQt4 import QtCore
from PyQt4.QtCore import Qt, QProcess, QTimer, QTimeLine
from PyQt4.QtGui    import QGroupBox, QTextEdit, QVBoxLayout, QHBoxLayout, \
                           QGridLayout, QSpacerItem, QSizePolicy
from utils import dump_ptree, PublishException
from SernaApi import XpathExpr, Grove

Ui_ProgressDialog, DialogBase = build_ui_widgets("ProgressDialog")


class ProgressDialog(Ui_ProgressDialog, DialogBase):
    def __init__(self, publisher, plugin, parentWidget=None):
        DialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("ProgressDialog")
        self.viewButton_.setEnabled(False)

        self._publisher = publisher
        self._plugin = plugin
        self._parent = parentWidget
        self._cancelled = False
        self._timeline = QTimeLine(1000 * 60, self)
        self._timeline.setFrameRange(0, 2 * 60)
Example #8
0
## which license is appropriate for your use, please contact the sales
## department at [email protected].
##
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
import os, sys

from ui import build_ui_widgets
from PyQt4.QtCore import Qt, QFileInfo
from PyQt4.QtGui import QApplication, QMessageBox, QFileDialog
from utils import dump_ptree

from dialogs.ProgressDialog import ProgressDialog

Ui_PublishDialog, DialogBase = build_ui_widgets("PublishDialog")


class PublishDialog(Ui_PublishDialog, DialogBase):
    def __init__(self, plugin, parentWidget=None, props=None):
        DialogBase.__init__(self, parentWidget)
        self.setupUi(self)
        self.setObjectName("PublishDialog")

        self._plugin = plugin
        self._props = props

        self._publishers = {}

        sernaDoc = self._plugin.sernaDoc()
        self._dsi = sernaDoc.getDsi()