Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Artanidos committed Jan 20, 2023
1 parent 7b4272d commit 34fb66c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 43 deletions.
4 changes: 2 additions & 2 deletions plugins/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
87 changes: 49 additions & 38 deletions plugins/revolutionslider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion web/Site.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Site {
author: ''
logo: ''
language: 'en'
publisher: 'GithubPublisher'
publisher: 'NoPublisher'
output: '../docs'
}
4 changes: 2 additions & 2 deletions widgets/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 34fb66c

Please sign in to comment.