parent
dbd2aecadb
commit
874e42a299
@ -1,922 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>library</class> |
||||
<widget class="QWidget" name="library"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>961</width> |
||||
<height>550</height> |
||||
</rect> |
||||
</property> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::DefaultContextMenu</enum> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Sankore Library</string> |
||||
</property> |
||||
<layout class="QGridLayout" name="gridLayout"> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<item row="0" column="0"> |
||||
<widget class="QFrame" name="topFrame"> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Raised</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<widget class="QTabWidget" name="libraryTab"> |
||||
<property name="tabShape"> |
||||
<enum>QTabWidget::Rounded</enum> |
||||
</property> |
||||
<property name="currentIndex"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="elideMode"> |
||||
<enum>Qt::ElideLeft</enum> |
||||
</property> |
||||
<widget class="QWidget" name="gipTab"> |
||||
<attribute name="title"> |
||||
<string>Iteractive Models</string> |
||||
</attribute> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_11"> |
||||
<item> |
||||
<widget class="UBThumbnailWidget" name="gipThumbnailView"> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::NoContextMenu</enum> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="verticalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAsNeeded</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="dragMode"> |
||||
<enum>QGraphicsView::NoDrag</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="interactiveTab"> |
||||
<attribute name="title"> |
||||
<string>Applications</string> |
||||
</attribute> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_3"> |
||||
<item> |
||||
<widget class="QFrame" name="interactiveTopLeftFrame"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Minimum"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::Box</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>1</number> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_3"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="UBLibraryTreeWidget" name="interactiveLibraryTreeWidget"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="dragDropMode"> |
||||
<enum>QAbstractItemView::DropOnly</enum> |
||||
</property> |
||||
<property name="horizontalScrollMode"> |
||||
<enum>QAbstractItemView::ScrollPerPixel</enum> |
||||
</property> |
||||
<property name="autoExpandDelay"> |
||||
<number>2</number> |
||||
</property> |
||||
<property name="headerHidden"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<attribute name="headerVisible"> |
||||
<bool>false</bool> |
||||
</attribute> |
||||
<column> |
||||
<property name="text"> |
||||
<string notr="true">1</string> |
||||
</property> |
||||
</column> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="newInteractiveFolderButton"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Minimum"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>42</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>New Folder</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/newFolder.png</normaloff>:/images/toolbar/newFolder.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextBesideIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="arrowType"> |
||||
<enum>Qt::NoArrow</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="addInteractiveToLibraryButton"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Minimum"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>42</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Import to Library</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/addInteractiveToLibrary.png</normaloff>:/images/toolbar/addInteractiveToLibrary.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextBesideIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QStackedWidget" name="interactiveLibrariesStack"> |
||||
<widget class="QWidget" name="interactivePageLocal"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_7"> |
||||
<item> |
||||
<widget class="UBThumbnailWidget" name="interactiveThumbnailView"> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::NoContextMenu</enum> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="verticalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAsNeeded</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="dragMode"> |
||||
<enum>QGraphicsView::NoDrag</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="interactivePageOnline"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_8"/> |
||||
</widget> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="imageTab"> |
||||
<attribute name="title"> |
||||
<string>Images</string> |
||||
</attribute> |
||||
<layout class="QHBoxLayout" name="horizontalLayout"> |
||||
<item> |
||||
<widget class="QFrame" name="imageTopLeftFrame"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Minimum"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::Box</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_2"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="UBLibraryTreeWidget" name="imageLibraryTreeWidget"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="horizontalScrollMode"> |
||||
<enum>QAbstractItemView::ScrollPerPixel</enum> |
||||
</property> |
||||
<property name="autoExpandDelay"> |
||||
<number>2</number> |
||||
</property> |
||||
<property name="headerHidden"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<attribute name="headerVisible"> |
||||
<bool>false</bool> |
||||
</attribute> |
||||
<column> |
||||
<property name="text"> |
||||
<string notr="true">1</string> |
||||
</property> |
||||
</column> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="newFolderButton"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed"> |
||||
<horstretch>1</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>42</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>New Folder</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/newFolder.png</normaloff>:/images/toolbar/newFolder.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextBesideIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="addImageToLibraryButton"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed"> |
||||
<horstretch>1</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>0</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>16777215</width> |
||||
<height>42</height> |
||||
</size> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Import to Library</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/addToLibrary.png</normaloff>:/images/toolbar/addToLibrary.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextBesideIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QStackedWidget" name="imageLibrariesStack"> |
||||
<property name="currentIndex"> |
||||
<number>1</number> |
||||
</property> |
||||
<widget class="QWidget" name="imagePageLocal"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_5"> |
||||
<item> |
||||
<widget class="UBThumbnailWidget" name="imageThumbnailView"> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::NoContextMenu</enum> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="verticalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAsNeeded</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="dragMode"> |
||||
<enum>QGraphicsView::NoDrag</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="imagePageOnline"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_4"/> |
||||
</widget> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="videoTab"> |
||||
<attribute name="title"> |
||||
<string>Movies</string> |
||||
</attribute> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_10"> |
||||
<item> |
||||
<widget class="QFrame" name="videoTopLeftFrame"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Minimum"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::Box</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_4"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="UBLibraryTreeWidget" name="videoLibraryTreeWidget"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="horizontalScrollMode"> |
||||
<enum>QAbstractItemView::ScrollPerPixel</enum> |
||||
</property> |
||||
<property name="autoExpandDelay"> |
||||
<number>2</number> |
||||
</property> |
||||
<property name="headerHidden"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<attribute name="headerVisible"> |
||||
<bool>false</bool> |
||||
</attribute> |
||||
<column> |
||||
<property name="text"> |
||||
<string notr="true">1</string> |
||||
</property> |
||||
</column> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QStackedWidget" name="videoLibrariesStack"> |
||||
<property name="currentIndex"> |
||||
<number>0</number> |
||||
</property> |
||||
<widget class="QWidget" name="videoPageLocal"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_6"> |
||||
<item> |
||||
<widget class="UBThumbnailWidget" name="videoThumbnailView"> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::NoContextMenu</enum> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="verticalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAsNeeded</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="dragMode"> |
||||
<enum>QGraphicsView::NoDrag</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="videoPageOnline"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_9"/> |
||||
</widget> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="shapeTab"> |
||||
<attribute name="title"> |
||||
<string>Shapes</string> |
||||
</attribute> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
||||
<item> |
||||
<widget class="UBThumbnailWidget" name="shapeThumbnailView"> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::NoContextMenu</enum> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="verticalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAsNeeded</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="dragMode"> |
||||
<enum>QGraphicsView::NoDrag</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<widget class="QWidget" name="soundTab"> |
||||
<attribute name="title"> |
||||
<string>Sounds</string> |
||||
</attribute> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_12"> |
||||
<item> |
||||
<widget class="UBThumbnailWidget" name="soundThumbnailView"> |
||||
<property name="contextMenuPolicy"> |
||||
<enum>Qt::NoContextMenu</enum> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="verticalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAsNeeded</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="dragMode"> |
||||
<enum>QGraphicsView::NoDrag</enum> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QFrame" name="toolFrame"> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Plain</enum> |
||||
</property> |
||||
<property name="lineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="midLineWidth"> |
||||
<number>0</number> |
||||
</property> |
||||
<layout class="QHBoxLayout" name="toolFrameLayout"> |
||||
<item> |
||||
<spacer name="horizontalSpacer_1"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeType"> |
||||
<enum>QSizePolicy::Fixed</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="removeButton"> |
||||
<property name="text"> |
||||
<string>Delete</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/remove.png</normaloff>:/images/toolbar/remove.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="setAsBackgroundButton"> |
||||
<property name="text"> |
||||
<string>Set as Background</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/setBackground.png</normaloff>:/images/toolbar/setBackground.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="removeBackgroundButton"> |
||||
<property name="text"> |
||||
<string>Remove Background</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/removeBackground.png</normaloff>:/images/toolbar/removeBackground.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="addToDocumentButton"> |
||||
<property name="text"> |
||||
<string>Add File to Page</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/import.png</normaloff>:/images/toolbar/import.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="addToPageButton"> |
||||
<property name="text"> |
||||
<string>Add to Page</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/toolbar/addToPage.png</normaloff>:/images/toolbar/addToPage.png</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QToolButton" name="addToParaschoolEditor"> |
||||
<property name="enabled"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="autoFillBackground"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Add to Editor</string> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../sankore.qrc"> |
||||
<normaloff>:/images/addItemToCurrentPage.svg</normaloff>:/images/addItemToCurrentPage.svg</iconset> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>32</width> |
||||
<height>32</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolButtonStyle"> |
||||
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
</property> |
||||
<property name="autoRaise"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="horizontalSpacer_4"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QSlider" name="zoomSlider"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>150</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="minimum"> |
||||
<number>50</number> |
||||
</property> |
||||
<property name="maximum"> |
||||
<number>500</number> |
||||
</property> |
||||
<property name="singleStep"> |
||||
<number>10</number> |
||||
</property> |
||||
<property name="value"> |
||||
<number>150</number> |
||||
</property> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="invertedAppearance"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="invertedControls"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="horizontalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeType"> |
||||
<enum>QSizePolicy::Minimum</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<layoutdefault spacing="0" margin="0"/> |
||||
<customwidgets> |
||||
<customwidget> |
||||
<class>UBThumbnailWidget</class> |
||||
<extends>QGraphicsView</extends> |
||||
<header>gui/UBThumbnailWidget.h</header> |
||||
</customwidget> |
||||
<customwidget> |
||||
<class>UBLibraryTreeWidget</class> |
||||
<extends>QTreeWidget</extends> |
||||
<header>board/UBLibraryTreeWidget.h</header> |
||||
</customwidget> |
||||
</customwidgets> |
||||
<resources> |
||||
<include location="../sankore.qrc"/> |
||||
</resources> |
||||
<connections/> |
||||
</ui> |
File diff suppressed because it is too large
Load Diff
@ -1,247 +0,0 @@ |
||||
/*
|
||||
* UBLibraryTreeWidget.cpp |
||||
* |
||||
* Created on: 28 juil. 2009 |
||||
* Author: Luc |
||||
*/ |
||||
|
||||
#include "UBLibraryTreeWidget.h" |
||||
|
||||
#include "frameworks/UBFileSystemUtils.h" |
||||
|
||||
#include "core/UBApplication.h" |
||||
#include "core/UBSettings.h" |
||||
|
||||
#include "board/UBBoardController.h" |
||||
|
||||
#include "network/UBHttpGet.h" |
||||
|
||||
#include "domain/UBW3CWidget.h" |
||||
|
||||
#include "UBLibraryController.h" |
||||
|
||||
|
||||
UBLibraryTreeWidget::UBLibraryTreeWidget(QWidget * parent) |
||||
: QTreeWidget(parent) |
||||
, mDropFolderItem(0) |
||||
{ |
||||
setDragDropMode(QAbstractItemView::DropOnly); |
||||
setAcceptDrops(true); |
||||
viewport()->setAcceptDrops(true); |
||||
setDropIndicatorShown(true); |
||||
} |
||||
|
||||
|
||||
UBLibraryTreeWidget::~UBLibraryTreeWidget() |
||||
{ |
||||
// NOOP
|
||||
} |
||||
|
||||
bool UBLibraryTreeWidget::supportMimeData(const QMimeData* pMimeData) |
||||
{ |
||||
foreach(QString mimeType, mMimeTypes) |
||||
{ |
||||
foreach(QString format, pMimeData->formats()) |
||||
{ |
||||
if (format.startsWith(mimeType)) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
} |
||||
|
||||
foreach (QUrl url, pMimeData->urls()) |
||||
{ |
||||
foreach(QString ext, mFileExtensions) |
||||
{ |
||||
if (url.toString().endsWith(ext)) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
} |
||||
|
||||
foreach (QUrl url, pMimeData->urls()) |
||||
{ |
||||
foreach(QString protocole, mProtocoles) |
||||
{ |
||||
if (url.toString().startsWith(protocole)) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
} |
||||
|
||||
return false; |
||||
} |
||||
|
||||
|
||||
void UBLibraryTreeWidget::dragEnterEvent(QDragEnterEvent * event) |
||||
{ |
||||
mDropFolderItem = 0; |
||||
|
||||
if (supportMimeData(event->mimeData())) |
||||
{ |
||||
event->acceptProposedAction(); |
||||
return; |
||||
} |
||||
else |
||||
{ |
||||
QTreeWidget::dragEnterEvent(event); |
||||
} |
||||
} |
||||
|
||||
|
||||
void UBLibraryTreeWidget::dragMoveEvent(QDragMoveEvent * event) |
||||
{ |
||||
QTreeWidgetItem * ti = itemAt(event->pos()); |
||||
UBLibraryFolderItem * lfi = dynamic_cast<UBLibraryFolderItem*>(ti); |
||||
|
||||
if (lfi && lfi->canWrite() && !(lfi == currentItem())) |
||||
{ |
||||
event->acceptProposedAction(); |
||||
return; |
||||
} |
||||
|
||||
QTreeWidget::dragMoveEvent(event); |
||||
} |
||||
|
||||
|
||||
void UBLibraryTreeWidget::dropEvent(QDropEvent * event) |
||||
{ |
||||
QTreeWidgetItem * ti = itemAt(event->pos()); |
||||
UBLibraryFolderItem * lfi = dynamic_cast<UBLibraryFolderItem*>(ti); |
||||
|
||||
if (lfi) |
||||
{ |
||||
UBLibraryFolderItem * sourceLfi = dynamic_cast<UBLibraryFolderItem*>(currentItem()); |
||||
|
||||
mDropFolderItem = lfi; |
||||
|
||||
QDir dir = lfi->dir(); |
||||
|
||||
foreach(QUrl url, event->mimeData()->urls()) |
||||
{ |
||||
// is it local ?
|
||||
QString localFile = url.toLocalFile(); |
||||
|
||||
if (localFile.length() > 0) |
||||
{ |
||||
QFileInfo fileInfo(localFile); |
||||
|
||||
//is it a file ?
|
||||
if (fileInfo.isFile()) |
||||
{ |
||||
// copy file to dir
|
||||
QFile file(localFile); |
||||
|
||||
if (sourceLfi && sourceLfi->canWrite()) |
||||
{ |
||||
file.rename(dir.filePath(fileInfo.fileName())); |
||||
emit contentChanged(); |
||||
} |
||||
else |
||||
{ |
||||
file.copy(dir.filePath(fileInfo.fileName())); |
||||
} |
||||
} |
||||
else if (fileInfo.isDir()) |
||||
{ |
||||
if (sourceLfi && sourceLfi->canWrite()) |
||||
{ |
||||
UBFileSystemUtils::moveDir(localFile, dir.filePath(fileInfo.fileName())); |
||||
emit contentChanged(); |
||||
} |
||||
else |
||||
{ |
||||
UBFileSystemUtils::copyDir(localFile, dir.filePath(fileInfo.fileName())); |
||||
} |
||||
} |
||||
} |
||||
else if (url.toString().startsWith("uniboardTool://")) |
||||
{ |
||||
UBApplication::boardController->libraryController()->addNativeToolToFavorites(url); |
||||
} |
||||
else |
||||
{ |
||||
UBHttpGet* httpGet = new UBHttpGet(this); // TODO UB 4.6 we are leaking here, tree widget is never destroyed
|
||||
|
||||
connect(httpGet, SIGNAL(downloadFinished(bool, QUrl, QString, QByteArray, QPointF, QSize, bool)), |
||||
this, SLOT(downloadFinished(bool, QUrl, QString, QByteArray))); |
||||
|
||||
UBApplication::setOverrideCursor(Qt::WaitCursor); |
||||
UBApplication::showMessage(tr("Downloading content from %1").arg(url.toString()), true); |
||||
|
||||
httpGet->get(url); |
||||
} |
||||
} |
||||
|
||||
event->acceptProposedAction(); |
||||
return; |
||||
} |
||||
else |
||||
{ |
||||
QTreeWidget::dropEvent(event); |
||||
} |
||||
} |
||||
|
||||
|
||||
void UBLibraryTreeWidget::downloadFinished(bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData) |
||||
{ |
||||
if (!pSuccess) |
||||
{ |
||||
UBApplication::showMessage(tr("Downloading content %1 failed").arg(sourceUrl.toString())); |
||||
} |
||||
else |
||||
{ |
||||
UBApplication::showMessage(tr("Download finished")); |
||||
QStringList urlPathParts = sourceUrl.path().split("/"); |
||||
|
||||
if (urlPathParts.length() > 0 && mDropFolderItem) |
||||
{ |
||||
QString fileName = urlPathParts.last(); |
||||
|
||||
QString ext = UBFileSystemUtils::fileExtensionFromMimeType(pContentTypeHeader); |
||||
|
||||
if (!fileName.endsWith(ext)) |
||||
{ |
||||
fileName += "." + ext; |
||||
} |
||||
|
||||
QString filePath = mDropFolderItem->dir().filePath(fileName); |
||||
QString nextItemPath = UBFileSystemUtils::nextAvailableFileName(filePath); |
||||
|
||||
if (UBSettings::widgetFileExtensions.contains(ext)) |
||||
{ |
||||
QTemporaryFile tempFile; |
||||
|
||||
if (tempFile.open()) |
||||
{ |
||||
tempFile.write(pData); |
||||
tempFile.close(); |
||||
|
||||
QDir widgetDir(nextItemPath); |
||||
|
||||
UBFileSystemUtils::expandZipToDir(tempFile, widgetDir); |
||||
} |
||||
} |
||||
else if(UBW3CWidget::hasNPAPIWrapper(pContentTypeHeader)) |
||||
{ |
||||
QString widgetPath = UBW3CWidget::createNPAPIWrapperInDir(sourceUrl.toString() |
||||
, mDropFolderItem->dir(), pContentTypeHeader); |
||||
} |
||||
else |
||||
{ |
||||
QFile itemFile(nextItemPath); |
||||
if (itemFile.open(QIODevice::WriteOnly)) |
||||
{ |
||||
itemFile.write(pData); |
||||
itemFile.close(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
UBApplication::restoreOverrideCursor(); |
||||
} |
||||
|
@ -1,62 +0,0 @@ |
||||
/*
|
||||
* UBLibraryTreeWidget.h |
||||
* |
||||
* Created on: 28 juil. 2009 |
||||
* Author: Luc |
||||
*/ |
||||
|
||||
#ifndef UBLIBRARYTREEWIDGET_H_ |
||||
#define UBLIBRARYTREEWIDGET_H_ |
||||
|
||||
#include <QtGui> |
||||
|
||||
class UBLibraryFolderItem; |
||||
|
||||
class UBLibraryTreeWidget : public QTreeWidget |
||||
{ |
||||
Q_OBJECT; |
||||
|
||||
public: |
||||
UBLibraryTreeWidget(QWidget * parent = 0); |
||||
virtual ~UBLibraryTreeWidget(); |
||||
|
||||
void setMimeTypes(const QStringList& pMimeTypes) |
||||
{ |
||||
mMimeTypes = pMimeTypes; |
||||
} |
||||
|
||||
void setFileExtensions(const QStringList& pFileExtensions) |
||||
{ |
||||
mFileExtensions = pFileExtensions; |
||||
} |
||||
|
||||
void setProtocoles(const QStringList& pProtocoles) |
||||
{ |
||||
mProtocoles = pProtocoles; |
||||
} |
||||
|
||||
bool supportMimeData(const QMimeData* pMimeData); |
||||
|
||||
signals: |
||||
void contentChanged(); |
||||
|
||||
protected: |
||||
|
||||
virtual void dragEnterEvent(QDragEnterEvent * event); |
||||
virtual void dragMoveEvent(QDragMoveEvent * event); |
||||
virtual void dropEvent(QDropEvent * event); |
||||
|
||||
private slots: |
||||
void downloadFinished(bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData); |
||||
|
||||
private: |
||||
|
||||
UBLibraryFolderItem* mDropFolderItem; |
||||
|
||||
QStringList mMimeTypes; |
||||
QStringList mFileExtensions; |
||||
QStringList mProtocoles; |
||||
|
||||
}; |
||||
|
||||
#endif /* UBLIBRARYTREEWIDGET_H_ */ |
Loading…
Reference in new issue