diff --git a/plugins/github.py b/plugins/github.py index 4ea3bd8..abfa69b 100644 --- a/plugins/github.py +++ b/plugins/github.py @@ -70,8 +70,8 @@ def __init__(self): self.reponame.setText(settings.value("github.reponame")) - def setSitePath(self, path): - self.site_path = path + def setSitePath(self, site_path, project_path): + self.site_path = site_path def push(self): QApplication.setOverrideCursor(Qt.WaitCursor) diff --git a/plugins/revolutionslider.py b/plugins/revolutionslider.py index 4f61ca3..ae533f2 100644 --- a/plugins/revolutionslider.py +++ b/plugins/revolutionslider.py @@ -29,7 +29,7 @@ from widgets.imageselector import ImageSelector from plugins.texteditor import XmlHighlighter from PySide6.QtQml import qmlRegisterType -from PySide6.QtCore import ClassInfo, Qt, Property, QObject, QDir, QFileInfo, QFile, QPoint, QAbstractAnimation, QParallelAnimationGroup, QPropertyAnimation +from PySide6.QtCore import ClassInfo, Qt, Property, QObject, QRect, QDir, QFileInfo, QFile, QPoint, QAbstractAnimation, QParallelAnimationGroup, QPropertyAnimation from PySide6.QtQml import ListProperty from PySide6.QtGui import QImage, QFont, QFontMetrics from PySide6.QtWidgets import QFileDialog, QLineEdit, QGridLayout, QWidget, QTextEdit, QTableWidgetItem, QLabel, QPushButton, QTableWidget, QAbstractItemView, QHeaderView @@ -195,52 +195,63 @@ def animate(self, item): self.editor.resize(self.sourcewidget.size()) self.editor.show() - self.animationgroup = QParallelAnimationGroup() - self.animx = QPropertyAnimation() - self.animx.setDuration(300) - self.animx.setStartValue(pos.x()) - self.animx.setEndValue(0) - self.animx.setTargetObject(self.editor) - self.animx.setPropertyName("x".encode("utf-8")) - self.animationgroup.addAnimation(self.animx) - self.animy = QPropertyAnimation() - self.animy.setDuration(300) - self.animy.setStartValue(pos.y()) - self.animy.setEndValue(0) - self.animy.setTargetObject(self.editor) - self.animy.setPropertyName("y".encode("utf-8")) - self.animationgroup.addAnimation(self.animy) - self.animw = QPropertyAnimation() - self.animw.setDuration(300) - self.animw.setStartValue(self.sourcewidget.size().width()) - self.animw.setEndValue(self.size().width()) - self.animw.setTargetObject(self.editor) - self.animw.setPropertyName("width".encode("utf-8")) - self.animationgroup.addAnimation(self.animw) - self.animh = QPropertyAnimation() - self.animh.setDuration(300) - self.animh.setStartValue(self.sourcewidget.size().height()) - self.animh.setEndValue(self.size().height()) - self.animh.setTargetObject(self.editor) - self.animh.setPropertyName("height".encode("utf-8")) - self.animationgroup.addAnimation(self.animh) - self.animationgroup.finished.connect(self.animationFineshedZoomIn) - self.animationgroup.start() + self.animation = QPropertyAnimation(self.editor, "geometry".encode("utf-8")) + self.animation.setDuration(300) + self.animation.setStartValue(QRect(pos.x(), pos.y(), self.sourcewidget.size().width(), self.sourcewidget.size().height())) + self.animation.setEndValue(QRect(0, 0, self.size().width(), self.size().height())) + self.animation.finished.connect(self.animationFineshedZoomIn) + self.animation.start() + + # self.animationgroup = QParallelAnimationGroup() + # self.animx = QPropertyAnimation() + # self.animx.setDuration(300) + # self.animx.setStartValue(pos.x()) + # self.animx.setEndValue(0) + # self.animx.setTargetObject(self.editor) + # self.animx.setPropertyName("x".encode("utf-8")) + # self.animationgroup.addAnimation(self.animx) + # self.animy = QPropertyAnimation() + # self.animy.setDuration(300) + # self.animy.setStartValue(pos.y()) + # self.animy.setEndValue(0) + # self.animy.setTargetObject(self.editor) + # self.animy.setPropertyName("y".encode("utf-8")) + # self.animationgroup.addAnimation(self.animy) + # self.animw = QPropertyAnimation() + # self.animw.setDuration(300) + # self.animw.setStartValue(self.sourcewidget.size().width()) + # self.animw.setEndValue(self.size().width()) + # self.animw.setTargetObject(self.editor) + # self.animw.setPropertyName("width".encode("utf-8")) + # self.animationgroup.addAnimation(self.animw) + # self.animh = QPropertyAnimation() + # self.animh.setDuration(300) + # self.animh.setStartValue(self.sourcewidget.size().height()) + # self.animh.setEndValue(self.size().height()) + # self.animh.setTargetObject(self.editor) + # self.animh.setPropertyName("height".encode("utf-8")) + # self.animationgroup.addAnimation(self.animh) + # self.animationgroup.finished.connect(self.animationFineshedZoomIn) + # self.animationgroup.start() def animationFineshedZoomIn(self): pass def editorClosed(self): pos = self.sourcewidget.mapTo(self, QPoint(0,0)) + self.animation.setStartValue(QRect(pos.x(), pos.y(), self.sourcewidget.size().width(), self.sourcewidget.size().height())) + self.animation.setDirection(QAbstractAnimation.Backward) + self.animation.start() + # correct end values in case of resizing the window - self.animx.setStartValue(pos.x()) - self.animy.setStartValue(pos.y()) - self.animw.setStartValue(self.sourcewidget.size().width()) - self.animh.setStartValue(self.sourcewidget.size().height()) - self.animationgroup.setDirection(QAbstractAnimation.Backward) + #self.animx.setStartValue(pos.x()) + #self.animy.setStartValue(pos.y()) + #self.animw.setStartValue(self.sourcewidget.size().width()) + #self.animh.setStartValue(self.sourcewidget.size().height()) + #self.animationgroup.setDirection(QAbstractAnimation.Backward) #self.animationgroup.finished()), this, SLOT(animationFineshedZoomIn())) #connect(m_animationgroup, SIGNAL(finished()), this, SLOT(animationFineshedZoomOut())) - self.animationgroup.start() + #self.animationgroup.start() item = self.list.item(self.row, 1) item.setData(Qt.UserRole, self.editor.slide) diff --git a/web/Site.qml b/web/Site.qml index 840098b..fdd7f41 100644 --- a/web/Site.qml +++ b/web/Site.qml @@ -9,6 +9,6 @@ Site { author: '' logo: '' language: 'en' - publisher: 'GithubPublisher' + publisher: 'NoPublisher' output: '../docs' } diff --git a/widgets/interfaces.py b/widgets/interfaces.py index d0ba1e2..7ec7067 100644 --- a/widgets/interfaces.py +++ b/widgets/interfaces.py @@ -80,8 +80,8 @@ def __init__(self): self.version = "" self._site_path = "" - def setSitePath(self, path): - self._site_path = path + def setSitePath(self, site_path, project_path): + self._site_path = site_path class GeneratorInterface():