diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index 1c7b4ae7..aff1440b 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -7,7 +7,7 @@ CONFIG += debug_and_release \ no_include_pwd VERSION_MAJ = 1 -VERSION_MIN = 28 +VERSION_MIN = 35 VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error VERSION_PATCH = 00 diff --git a/release.linux.sh b/release.linux.sh index 51742ee3..fffc2450 100644 --- a/release.linux.sh +++ b/release.linux.sh @@ -19,7 +19,7 @@ make clean rm -rf build/linux/release/ rm -rf install -QT_PATH="/usr/local/Trolltech/Qt-4.7.3" +QT_PATH="../Qt-sankore3.1" PLUGINS_PATH="$QT_PATH/plugins" QMAKE_PATH="$QT_PATH/bin/qmake" diff --git a/resources/i18n/sankore_es.qm b/resources/i18n/sankore_es.qm index 6bd22c41..8854c556 100644 Binary files a/resources/i18n/sankore_es.qm and b/resources/i18n/sankore_es.qm differ diff --git a/resources/i18n/sankore_es.ts b/resources/i18n/sankore_es.ts index 351c3694..238bcdfb 100644 --- a/resources/i18n/sankore_es.ts +++ b/resources/i18n/sankore_es.ts @@ -1,1578 +1,2308 @@ - + + + BlackoutWidget + Click to Return to Application - - - - background: url(:/images/bigUniboard.png); border: none; - + Clic para volver a la aplicación DownloadDialog + Downloads - + Descargas + Clean Up - + Limpiar + 0 Items - + 0 elementos DownloadItem + Form - + Forma + Filename - + Nom. archivo + Try Again - + Nuevo intento + Stop - + Detener + Open - - - - Ico - + Abrir IntranetPodcastPublishingDialog + Publish Podcast to YouTube - + Publicar podcast en YouTube + Title - + Título + Description - + Descripción + Author - + Autor MainWindow + Uniboard - + Uniboard + + Board - + Pizarra + + Web - + Web + + Documents - - - - Tutorial - + Documentos + + Stylus - + Trazos + Ctrl+T - + Ctrl+T + Backgrounds - + Fondos + Change Background - + Cambiar fondo + Undo - + Deshacer + Ctrl+Z - + Ctrl+Z + Redo - + Rehacer + Ctrl+Y - + Ctrl+Y + Previous - + Anterior + + Previous Page - + Página anterior + PgUp - + RePág + Next - + Siguiente + + Next Page - + Página siguiente + PgDown - + AvPág + Manage Documents - + Administrar documentos + Ctrl+D - + Ctrl+D + Web Browsing - + Navegador Web + Ctrl+W - - - - Line - + Ctrl+W - Small Line - + Share Item on the Web + Compartir elemento en la Web - Medium Line - + Share Capture on the Web + Compartir captura en la web - Large Line - + Define Drawing Options + Definir opciones de dibujo + Quit - + Salir + Quit Uniboard - - - - Eraser - - - - Smalle Eraser - - - - Medium Eraser - - - - Large Eraser - + Salir de Ubiboard + + + + + Color - + Color + Back - + Atrás + Left - + Izquierda + Forward - + Adelante + Right - + Derecha + Reload - - - - Reload Current Page - + Recargar + Home - - - - Load Home Page - + Inicio + Bookmarks - - - - Show Bookmarks - + Favoritos + Bookmark - - - - Add Bookmark - - - - Display Board - + Favorito + Ctrl+B - + Ctrl+B + Erase - - - - Erase Content - + Borrar + Preferences - + Preferencias - Display Preferences - + + Library + Biblioteca - Library - + + Ctrl+L + Ctrl+L - Show Library - + + Open the tutorial + Abrir el tutorial - Ctrl+L - + + Check Update + Comprobar actualizaciones - - Sankoré 3.1 - + + + Sankoré Editor + Editor Sankoré - Sankore 3.1 - + + Show Sankore Widgets Editor + Mostrar editor de Widgets Sankore + + + + Hide Sankoré + Ocultar Sankoré + + + + Hide Sankoré Application + Ocultar aplicación Sankoré - Show Desktop - + + Ctrl+H + Ctrl+H - Show Computer Desktop - + + Bigger + Aumentar - Ctrl+Shift+H - + + + Tutorial + Tutorial + + + + Sankoré 3.1 + Sankoré 3.1 - Bigger - + + Sankore 3.1 + Sankore 3.1 - Zoom In - + + Show Desktop + Mostrar Escritorio + Ctrl++ - + Ctrl++ + Smaller - - - - Zoom Out - + Reducir + Ctrl+- - + Ctrl+- + New Folder - - - - Create a New Folder - + Nueva carpeta + New Document - - - - Create a New Document - + Nuevo documento + Import - - - - Import a Document - + Importar + Export - - - - Export a Document - + Exportar + Open in Board - - - - Open Page in Board - + Abrir en pizarra + Ctrl+O - + Ctrl+O + Duplicate - - - - Duplicate Selected Content - + Duplicar + Delete - - - - Delete Selected Content - + Limpiar + Del - + Limp + Add to Working Document - + Añadir a documento trabajo + Add Selected Content to Open Document - + Añadir contenido seleccionado al documento abierto + + Add - - - - Add Content to Document - + Añadir + Rename - - - - Rename Content - + Renombrar + + Tools - - - - Display Tools - + Herram. + Multi Screen - + Multipantalla + + Wide Size (16/9) - - - - Use Document Wide Size (16/9) - + Tamaño amplio (16/9) + + Regular Size (4/3) - - - - Use Document Regular Size (4/3) - + Tamaño normal (4/3) + + Custom Size - - - - Use Custom Document Size - + Tamaño a medida + Stop Loading - - - - Stop Loading Web Page - + Detener carga + Cut - + Cortar + Copy - + Copiar + Paste - + Pegar + Sleep - - - - Put Presentation to Sleep - + Suspender + Virtual Keyboard - - - - Display Virtual Keyboard - + Teclado virtual + + Plain Light Background - + Fondo claro liso + + Light - + Claro - Grid Light Background - + + Start Screen Recording + Comenzar a grabar pantalla - Plain Dark Background - + + Configure Podcast Recording + Configurar grabación Podcast - Dark + + Flash Trap - Grid Dark Background + + Trap Flash Content - Podcast + + Web Trap - Record Presentation to Video + + Trap Web Content - Record - + + Window Capture + Captura de ventana - Start Screen Recording - + + Show on Display + Mostrar en pantalla - Erase Items - + + + Plain Dark Background + Fondo oscuro liso - Erase All Items - + + + Dark + Oscuro - Erase Annotations - + + Podcast + Podcast - Erase All Annotations - + + Record + Grabar - Clear Page - + + Erase Items + Borrar elementos - Clear All Elements - + + + Erase Annotations + Borrar anotaciones + + + + Clear Page + Limpiar página + Pen - + Lápiz + + + + + + + Eraser + Borrador + + + + Marker + Rotulador + + + + Selector + Selector + + + + Hand + Mano + + + + + Zoom In + Acercar + + + + + Zoom Out + Alejar + + + + + + + Line + Línea + + + + Small Line + Línea fina + + + + Medium Line + Línea media + + + + Large Line + Línea ancha + + + + Smalle Eraser + Borrador pequeño + + + + Medium Eraser + Borrador mediano + + + + Large Eraser + Borrador grande + + + + Reload Current Page + Recargar página actual + + + + Load Home Page + Cargar página de inicio + + + + Show Bookmarks + Mostrar marcadores + + + + Add Bookmark + Añadir marcador + + + + Display Board + Mostrar pizarra + + + + Erase Content + Borrar contenido + + + + Display Preferences + Mostrar preferencias + + + + Show Library + Mostrar biblioteca + + + + Show Computer Desktop + Mostrar escritorio del equipo + + + + Ctrl+Shift+H + Ctrl+Shift+H + + + + Create a New Folder + Crear nueva carpeta + + + + Create a New Document + Crear nuevo documento + + + + Import a Document + Importar documento + + + + Export a Document + Exportar documento + + + + Open Page in Board + Abrir página en pizarra + + + + Duplicate Selected Content + Duplicar elemento seleccionado + + + + Delete Selected Content + Borrar elemento seleccionado + + + + Add Content to Document + Añadir contenido al documento + + + + Rename Content + Renombrar contenido + + + + + Display Tools + Mostrar herramientas + + + + Use Document Wide Size (16/9) + Usar tamaño extendido (16/9) + + + + Use Document Regular Size (4/3) + Usar tamaño regular (4/3) + + + + Use Custom Document Size + Usar tamaño personalizado + + + + Stop Loading Web Page + Parar carga de la página + + + + Put Presentation to Sleep + Suspender presentación + + + + Display Virtual Keyboard + Mostrar teclado virtual + + + + + Grid Light Background + Rejilla de fondo claro + + + + + Grid Dark Background + Rejilla de fondo oscura + + + + Record Presentation to Video + Grabar presentación en vídeo + + + + Erase All Items + Borrar todos los elementos + + Erase All Annotations + Borrar todas las anotaciones + + + + Clear All Elements + Limpiar todos los elementos + + + Annotate Document - + Anotar documento + Ctrl+I - + Ctrl+I + Erase Annotation - + Borrar anotación + Ctrl+E - - - - Marker - + Ctrl+E + Highlight - + Subrayar + Ctrl+M - - - - Selector - + Ctrl+M + Select And Modify Objects - + Seleccionar y modificar objetos + Ctrl+F - - - - Hand - + Ctrl+F + Scroll Page - + Avanzar página + Laser Pointer - + Puntero laser + Virtual Laser Pointer - + Puntero laser virtual + Ctrl+G - + Ctrl+G + Draw Lines - + Dibujar líneas + Ctrl+J - + Ctrl+J + Text - + Texto + Write Text - + Escribir texto + Ctrl+K - + Ctrl+K + Capture - - - - Capture Part of the Screen - + Captura + + Add To Current Page - + Añadir a página actual + Add Item To Current Page - + Añadir elemento a la página actual + Add To New Page - + Añadir a nueva pág. + Add Item To New Page - + Añadir elemento a una página nueva + Add To Library - + Añadir a biblioteca + Add Item To Library - + Añadir elemento a la biblioteca + Pages - + Página + + Create a New Page - + Crear página nueva + New Page - + Nueva página + Duplicate Page - + Duplicar página + Duplicate the Current Page - + Duplicar página actual + Import Page - + Importar página + Import an External Page - + Importar página externa + Pause - + Pausa + Pause Podcast Recording - + Pausar grabación Podcast + Podcast Config - - - - Configure Podcast Recording - + Config podcast - Flash Trap - - - - Trap Flash Content - - - - Web Trap - - - - Trap Web Content - + + + Capture Part of the Screen + Capturar parte de la pantalla + Custom Capture - - - - Window Capture - + Captura personalizada + Capture a Window - + Capturar una ventana + Embed Web Content - + Contenido Web empotrado + Capture Embeddable Web Content - - - - Show on Display - + Capturar contenido Web empotrado + Show Main Screen on Display Screen - + Mostrar pantalla principal en la pantalla + Erase all Annotations - + Borrar todas las anotaciones + eduMedia - + eduMedia + Import eduMedia simulation - - - - Open the tutorial - - - - Check Update - - - - Sankoré Editor - - - - Show Sankore Widgets Editor - - - - Hide Sankoré - - - - Hide Sankoré Application - - - - Ctrl+H - + Importar simulación eduMedia PasswordDialog + Authentication Required - + Autenticación necesaria + Username: - + Nom. usuario: + Password: - - - - DUMMY ICON - - - - INTRO TEXT DUMMY - + Contraseña: ProxyDialog + Proxy Authentication - + Autenticación del proxy + Connect to Proxy - + Conectar al proxy + Username: - + Nom. usuario: + Password: - + Contraseña: + Save username and password for future use - - - - ICON - + Guardar usuario y contraseña para usos futuros QObject - Trash - Pictures category element - + /Home + Category list label on nagigation tool bar + Lista de etiquetas de categoría en la barra de herramientas + /Home Category list label on navigation tool bar - + Lista de etiquetas de categoría en la barra de navegación + + + + Trash + Pictures category element + Papelera + + + + QuaZipFile + + ZIP/UNZIP API error %1 + Error ZIP/UNZIP API %1 UBAbstractPublisher + + Contacting %1 + Contactando %1 + + + Found %1 + Encontrado %1 + + + Cannot Authenticate with %1 + No se pudo autenticar con %1 + UBAbstractWidget + Cannot load content - + Impos. cargar contenido + Loading ... - + Cargando... + + + + UBAcceptLicenseClass + + Uniboard License + Licencia Uniboard + + + Accept + Aceptar + + + Reject + Rechazar UBApplication + Quit + Salir + + + Page Size - + Tamaño de página + Podcast - + Podcast UBApplicationController + Web - + Web + New update available, would you go to the web page ? - + Nueva actualización disponible, ¿quieres ir a la página web? + + + + Update available + Actualización disponible + No update available - + No hay actualizaciones - Update available - + Your version is up-to-date. + Su versión está actualizada. + + + Failed to get information on software updates. + No se pudo obtener info de actualizaciones de SW. UBBoardController + Downloading content from %1 - + Descargando contenido de %1 + Downloading content %1 failed - + Descarga de contenido %1 fallida + Download finished - + Descarga completa + Flash is not supported on Uniboard Linux + Flash no está soportado en Linux Uniboard + + + Unknown tool type %1 - + Herramienta descon. %1 + Unknown content type %1 - + Contenido desconocido %1 + + + Attach Video File + Adjuntar vídeo + + + The selected video is quite big (%1 MB), would you rather attach it to the document, or keep only a link to it? + El vídeo seleccionado es demasiado grande (%1 MB), ¿desea adjuntarlo al documento o prefiere añadir solo un enlace? + + + Attach + Adjuntar + Link + Enlazar + + + Add Item - + Añadir elem. + All Supported (%1) - + Todos los compat. (%1) UBBoardPaletteManager + Remove this + Eliminar esto + + + Added 1 Image to Library + Añadida 1 imagen a biblioteca + + + Error Adding Image to Library - + Error al añadir imag. a biblioteca + + + Error Publishing Image to the Web + Error publicando imagen en la Web UBCachePropertiesWidget + Cache Properties - + Propiedades de cache + Color: - + Color: + Shape: + Size: - + Tamaño + Close - + Cerrar + + + + UBCapturePublisher + + Preparing capture for upload... + Preparando la captura para la subida... + + + Publication canceled ... + Publicación cancelada + + + Capture Published to the Web. + Captura publicada en la Web + + + Error Publishing Capture to the Web: %1 + Error publicando captura en la Web: %1 + + + + UBCapturePublishingDialog + + Publish + Publicar UBDesktopPalette + Show Uniboard - + Mostrar Uniboard + Capture Part of the Screen - + Capturar parte de la pantalla + Capture the Screen - + Capturar la pantalla + Show the stylus palette - + Mostrar la paleta de estilos + Show Board on Secondary Screen - + Mostrar la pizarra en la pantalla secundaria + Show Desktop on Secondary Screen - + Mostrar escritorio en pantalla secundaria UBDocumentController + + New Folder - + Nueva carpeta + Page %1 - + Página %1 + Add Folder of Images - + Añadir carpeta imágenes + Add Images - + Añadir imágenes + Add Pages from File - + Añadir págs. desde arch. + Duplicating Document %1 - + Duplicando documento %1 + Document %1 copied + Documento %1 copiado + + + + The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed? + Remove Page - + Eliminar página + + + + Are you sure you want to remove %n page(s) from the selected document '%1'? + + ¿Seguro que desea eliminar %n pág(s). del documento seleccionado '%1'? + + + Remove Document - + Eliminar documento + Are you sure you want to remove the document '%1'? - + ¿Seguro que desea eliminar el documento '%1'? + Empty Trash - + Vaciar papelera + Are you sure you want to empty trash? - + ¿Seguro que desea vaciar la papelera? + Emptying trash - + Vaciando papelera + Emptied trash - + Papelera vaciada + Remove Folder - + Eliminar carpeta + Are you sure you want to remove the folder '%1' and all its content? - + ¿Seguro que desea eliminar la carpeta '%1' y todo su contenido? + No document selected! - + Ningún doc. seleccionado + + Open Supported File - + Abrir archivo compatible + + Importing file %1... - + Importando archivo %1... + + Failed to import file ... - + Fallo al importar archivo... + Import all Images from Folder - + Importar todas imágenes de carpeta + Folder does not contain any image files! - + La carpeta no contiene archivos de imagen + Delete - + Limpiar + Empty - + Vaciar + Trash - + Papelera + Open Document - + Abrir documento + The document '%1' has been generated with a newer version of Uniboard (%2). By opening it, you may lose some information. Do you want to proceed? + El documento '%1' se ha generado con una versión nueva de Uniboard (%2). Al abrirlo, puede perder información. ¿Desea continuar? + + + Add all Images to Document - + Añadir todas las imág. al doc. + All Images (%1) - + Todas las imág. (%1) + Selection does not contain any image files! - - - - The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed? - + La selección no contiene archivos de imagen. UBDocumentManager + images - + imágenes + videos - + vídeos + objects - + objetos + widgets - + widgets + All supported files (*.%1) - + Todos archivos compat. (*.%1) + File %1 saved - + Arch. %1 guardado + Importing page %1 of %2 - + Importando página %1 de %2 + Erronous image data, skipping file %1 - + Datos de imag. erróneos, saltando arch. %1 UBDocumentNavigator + Page %0 - + Página %0 UBDocumentPublisher - Export failed. - + Preparing document for upload... + Preparando documento para subida... - Export canceled ... - + + + Export failed. + La exportación falló. - Converting page %1/%2 ... - + Export failed ... + La exportación falló ... + Credentials has to not been filled out yet. + Uploading Sankore File on Web. - + Subiendo archivo Sankore a la web. + + + + Export canceled ... + Exportación cancelada + + + + Converting page %1/%2 ... + Convirtiendo página %1/%2 + Document uploaded correctly on the web. - + Documento subido correctamente a la web. + Failed to upload document on the web. - + Fallo al subir documento a la web. + + + Upload to Uniboard Web in progress %1 % + Subiendo a la Web Uniboard en progreso %1 % + + + Sending document ... + Enviando documento ... + + + The document has been sent to %1 + El documento se ha enviado a %1 + + + Error while publishing document to %1 + Error cuando se publicaba el documento en %1 + + + Error while publishing document to %1 : (%2) + Error cuando se publicaba el documento en %1: (%2) + + + + UBDocumentPublishingDialog + + Publish + Publicar UBDocumentTreeWidget + %1 (copy) - + %1 (copia) + Copying page %1/%2 - + Copiando página %1/%2 + + + + %1 pages copied + + %1 páginas copiadas + + UBExportDocument + Page - + Página + Export as UBZ File - + Exportar como arch. UBZ + Exporting document... - + Exportando documento... + Export successful. - + Exportación correcta. + Exporting %1 %2 of %3 - + Exportando %1 %2 de %3 + Export to Sankore Format - + Exportar a formato Sankore + + + Export to Uniboard Format + Exportar a formato Uniboard UBExportFullPDF + Made with free version of Uniboard + Realizado con versión gratuita Uniboard + + + Export as PDF File - + Exportar como arch. PDF + Exporting document... - + Exportando documento... + Export successful. - + Exportación correcta. + Export to PDF - + Exportar a PDF UBExportPDF + Export as PDF File - + Exportar como arch. PDF + Exporting document... - + Exportando documento... + Export successful. - + Exportación correcta. + Exporting page %1 of %2 - + Exportando página %1 de %2 + + + Made with free version of Uniboard + Realizado con versión gratuita Uniboard + Export to PDF - + Exportar a PDF UBExportWeb + Page - + Página + Export as Web data - + Exportar como datos Web + Exporting document... - + Exportando documento... + Export successful. - + Exportación correcta. + Export failed. - + La exportación falló. + Export to Web Browser - + Exportar a navegador Web UBGraphicsItemDelegate + Locked - + Bloqueado + Visible on Extended Screen - + Visible en pantalla ampliada + Go to Content Source - + Ir a las fuentes del contenido UBGraphicsTextItem + <Type Text Here> - + <Type Text Here> UBGraphicsTextItemDelegate + Text Color - + Color de texto UBGraphicsWidgetItemDelegate + Frozen - + Congelado + Transform as Tool - + Tranformar a herramienta UBImportCFF + Common File Format ( + + Importing file %1... - + Importando archivo %1... + + Import of file %1 failed. - + La importación del archivo %1 falló. + + Import successful. - + Importación correcta. + + Import failed. - + La importación falló. UBImportDocument - Importing file %1... - + Uniboard (*.ubz) + Uniboard (*.ubz) - Import successful. - + + Sankore 3.1 (*.ubz) + Sankore 3.1 (*.ubz) - Sankore 3.1 (*.ubz) - + + + Importing file %1... + Importando archivo %1... + Import of file %1 failed. - + La importación del archivo %1 falló. + + + + + Import successful. + Importación correcta. UBImportImage + Image Format ( - + Formato de imagen ( + Image import failed. - + Error al importar imagen. + Image import successful. - + Imag. importada correctamente UBImportPDF + Portable Document Format (*.pdf) - + Portable Document Format (*.pdf) + PDF import failed. - + Error al importar PDF. + Importing page %1 of %2 - + Importando página %1 de %2 + PDF import successful. - + PDF importado correctamente + + + + UBImportVirtualPrinter + + Importing Uniboard printer file ... + Importando arch. impresora Uniboard... + + + Error while importing Uniboard printer file. + Error al importar archivo de impresora Uniboard. UBIntranetPodcastPublisher + Error while publishing video to intranet (%1) - + Error publicando vídeo a la red interna (%1) + Publishing to Intranet in progress %1 % + Publicando a la red interna en progreso %1 % + + + + UBIntranetPodcastPublishingDialog + + + Publish + Publicar + + + + UBLibActionBar + + + Add to favorites + Añadir a favoritos + + + + Share + Compartir + + + + Search + Buscar + + + + Delete + Borrar + + + + Back to folder + Carpeta atrás + + + + Remove from favorites + Quitar de favoritos + + + + Create new folder + Crear nueva carpeta + + + + UBLibItemProperties + + + Back + Atrás + + + + Add to page + Añadir a página + + + + Set as background + Poner como fondo + + + + Add to library + Añadir a la biblioteca + + + + Object informations + Información del objeto + + + + UBLibraryController + + Backgrounds + Fondos + + + + ImportedImage - - - UBIntranetPodcastPublishingDialog - Publish - + + Added 1 Image to Library + Añadida 1 imagen a biblioteca + + + + Audios + Audio category element + Sonidos + + + + Movies + Movies category element + Vídeos + + + + Pictures + Pictures category element + Fotos + + + + Shapes + Shapes category element + Formas + + + + Applications + Applications category element + Aplicaciones + + + + Favorite + Favorite category element + Favoritos + + + + Interactivities + Interactives category element + Interactivos + + + + Animations + Animations category element + Animaciones + + + Interactives + Interactives category element + Interactivos + + + + Creating image thumbnail for %1. + Creando vista previa para %1. + + + User Pictures + User Pictures directory + Carpeta de imágenes de usuario + + + Sankoré 3.1 Pictures + Sankoré 3.1 Pictures directory + Imágenes Sankoré 3.1 + + + Sankoré Interactive + Sankore interactivo + + + User Interactive + Usuario interactivo + + + Favorite Interactive + Favoritos interactivo + + + + Adding to page failed for item %1. + Error al añadir el elemento %1 a la página. + + + New Folder + Nueva carpeta + + + Add Item to Library + Añadir elem. a biblioteca + + + All Supported (%1) + Todos los compat. (%1) - - - UBLibActionBar - Add to favorites - + Copying page %1 of file %2 to library %3 + Copiando pág. %1 de arch. %2 a biblioteca %3 - Share - + Page + Página - Search - + Copying file %1 to library %2 (%3/%4) + Copiando arch. %1 a biblioteca %2 (%3/%4) - Delete - + Finished copying %1 files ... + Finalizada copia de %1 archivos... - Back to folder - + Creating thumbnail %1 (%2/%3) + Creando miniatura %1 (%2/%3) - Remove from favorites - + Remove Folder + Eliminar carpeta - Create new folder - + Are you sure you want to remove the folder %1 from the library? + ¿Seguro que desea eliminar la carpeta %1 de la biblioteca? - - - UBLibItemProperties - Back - + Remove Item + Eliminar elem. - Add to page - + Are you sure you want to remove the item from the library? + ¿Seguro que desea eliminar el elemento de la biblioteca? - Set as background - + Sankore 3.1 + Sankore 3.1 - Add to library - + Uniboard + Uniboard - Object informations - + My Images + Mis imágenes - - - UBLibraryController - Added 1 Image to Library - + My Applications + Mis aplicaciones - Audios - Audio category element - + My Movies + Mis vídeos - Movies - Movies category element - + Add Images to Current Page + Añadir imágenes a página actual - Pictures - Pictures category element - + All Images (%1) + Todas imágenes (%1) - Shapes - Shapes category element - + Add Applications to Current Page + Añadir aplicaciones a página actual - Applications - Applications category element - + All Applications (%1) + Todas aplicaciones (%1) - Favorite - Favorite category element - + Add Movies to Current Page + Añadir vídeos a pág. actual - Creating image thumbnail for %1. - + All Files (*.*) + Todos archivos (*.*) - Adding to page failed for item %1. - + Online + Online + + + UBLibraryTreeWidget - Interactivities - Interactives category element - + Downloading content from %1 + Descargando contenido de %1 - ImportedImage - + Downloading content %1 failed + Descarga de contenido %1 fallida - Animations - Animations category element - + Download finished + Descarga completa UBMainWindow + Yes - + + No - + No UBNetworkAccessManager + <qt>Enter username and password for "%1" at %2</qt> - + <qt>Introducir nom. de usuario y contraseña para "%1" en %2</qt> + Failed to log to Proxy - + Fallo al registrar el Proxy + SSL Errors: %1 @@ -1580,295 +2310,555 @@ %2 Do you want to ignore these errors for this host? - + Errores SSL: + +%1 + +%2 + +¿Desea ignorar estos errores para este host? UBNewFolderDlg + Add new folder - + Añadir nueva carpeta + New Folder name: - + Nombre de la nueva carpeta: + Add - + Añadir + Cancel - + Cancelar UBPersistenceManager + (copy) - + (copia) + Document Repository Loss - + Pérdida repositorio de docs. + Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well. + + Uniboard has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well. + Uniboard ha perdido acceso al repositorio de documentos '%1'. La aplicación debe cerrarse para evitar daños en los datos. Es posible que se pierdan los últimos cambios. + UBPodcastController - Failed to start encoder ... + Uniboard Cast + Convers. Uniboard + + + + Sankore Cast + + Failed to start encoder ... + Fallo al iniciar codificador... + + + No Podcast encoder available ... - + Ningún codif. podcast disponible... + Part %1 - + Parte %1 + on your desktop ... - + en el escritorio ... + in folder %1 - + en la carpeta %1 + Podcast created %1 - + Podcast creado %1 + Podcast recording error (%1) - + Error al grabar podcast (%1) + + + Made with free version of Uniboard + Realizado con versión gratuita Uniboard + Default Audio Input - + Entrada audio preconfig + No Audio Recording - + Ninguna grabación audio + Small - + Pequeña + Medium - + Mediana + Full - + Llena + Publish to Intranet - + Publicar en la red interna + Publish to Youtube - + Publicar en Youtube + + + + UBPowerPointApplication + + Converting PowerPoint file ... + Conversión archivo PowerPoint... - Sankore Cast - + PowerPoint import successful. + PPT importado correctamente. + + + PowerPoint import failed. + Error al importar PPT. + + + Uniboard printer is not installed. Import will be done in jpg format. + Impresora Uniboard no instalada. Importación en formato jpg. UBPreferencesController + License valid until %1 + Licencia válida hasta %1 + + + version: - + versión: + Marker is pressure sensitive - + Rotulador sensible a la presión + + + %1, for personal use only + %1, solo para uso personal UBProxyLoginDlg + Proxy Login - + Autenticación del proxy + Username: - + Usuario: + Password: - + Contraseña: UBPublicationDlg + Publish document on the web - + Publicar documento en la web + Title: - + Título + Description: - + Descripción: + Publish - + Publicar UBSettings + Untitled Documents - + Documentos sin título + Trash - + Papelera + + Images - + Imágenes + My Movies + Mis vídeos + + + + UBSoftwareUpdateController + + Downloading software update (%1%) + Descargando actualización de SW (%1%) + + + Downloading software update failed + Error al descargar la actualización SW + + + Download finished + Descarga completa + + + Software Update + Actualización de SW + + + Are you sure you want to install this new version of Uniboard now? +This session will close as soon as installation begins. + ¿Seguro que desea instalar la nueva versión de Uniboard ahora? +Se cerrará esta sesión cuando comience la instalación. + + + + UBSoftwareUpdateDialog + + Download... + Descarga... + + + Show this Message Again + Volver a mostrar el mensaje + + + Software Update + Actualización de SW + + + Your version: %1 + Su versión: %1 + + + New version: %1 + Nueva versión: %1 + + + + UBTeacherBarWidget + + + Title + Título + + + + Phasis + + + + + Duration + Duración + + + + Equipment + + + + + Activity + Actividad + + + + I discover + Yo descubro + + + + I experiment + Yo experimento + + + + I train myself + + + + + I play + Yo juego + + + + I memorize + + + + + Short + Corto + + + + Middle + Medio + + + + Long + Largo + + + + Alone + + + + + By Group + + + + + All together + + UBTeacherStudentAction + + + Action %0 + Acción %0 + + + + Teacher + Profesor + + + + Student + Alumno + + UBThumbnailAdaptor + Generating preview thumbnails ... - + Generando vista previa miniaturas... + %1 thumbnails generated ... - + %1 miniaturas generadas... UBToolsManager - Mask - + + Compass + Compás + Ruler - - - - Compass - + Regla + Protractor - + Transportador + Triangle - + Triángulo + Magnifier + Cache - + Cache + + + + Mask + Máscara UBTrapFlashController + Whole page - + Página entera + Web - + Web UBUpdateDlg + Document updater - + Actualizador del documento + files require an update. - + archivos necesitan actualizarse. + Backup path: - + Ruta a la copia de seguridad: + Browse - + Navegar + Update - + Actualizar + Select a backup folder + Seleccione un directorio de copia de seguridad + + + + Please wait the import process will start soon... + Files update successful! Please reboot the application to access the updated documents. + An error occured during the update. The files have not been affected. + Files update results - Updating file - - - - Please wait the import process will start soon... - + + Updating file + Actualizando archivo UBW3CWidget + Web - + Web UBWebPluginWidget + Loading... - + Cargando... UBWebPublisher + Publish Document on Uniboard Web + Publicar documento en la Web Uniboard + + + Publish Document on Sankore Web - + Publicar documento en la web de Sankore UBWidgetUniboardAPI + %0 called (method=%1, status=%2) @@ -1876,318 +2866,391 @@ Please reboot the application to access the updated documents. UBYouTubePublisher + YouTube authentication failed. - + Falló la autenticación en YouTube. + Error while uploading video to YouTube (%1) - + Error al cargar vídeo en YouTube (%1) + Upload to YouTube in progress %1 % - + Carga en YouTube en curso %1 % UBYouTubePublishingDialog + Upload - + Subir + Autos & Vehicles - + Coches y vehículos + Music - + Música + Pets & Animals - + Animales + Sports - + Deportes + Travel & Events - + Viajes y actividades + Gaming - + Juegos + Comedy - + Comedia + People & Blogs - + Gente y blogs + News & Politics - + Noticias y política + Entertainment - + Entretenimiento + Education - + Educación + Howto & Style - + Cómos y estilo + Nonprofits & Activism - + Activismo + Science & Technology - + Ciencia y tecnología UBZoomPalette + %1 x - + %1 x WBClearButton + Clear - + Limpiar WBDownloadItem + Save File - + Guardar arch. + Download canceled: %1 - + Descarga cancelada: %1 + Error opening saved file: %1 - + Error abriendo archivo guardado: %1 + Error saving: %1 - + Error al guardar: %1 + Network Error: %1 - + Error de red: %1 + seconds - + segundos + minutes - + minutos + - %4 %5 remaining - + quedan - %4 %5 + %1 of %2 (%3/sec) %4 - + %1 de %2 (%3/s) %4 + ? unknown file size - + ? + %1 of %2 - Stopped - + %1 de %2 - Detenido + bytes - + bytes + KB - + KB + MB - + MB WBDownloadManager + 1 Download - + 1 descarga + %1 Downloads always >= 2 - + %1 descargas WBHistoryModel + Title - + Título + Address - + Dirección WBHistoryTreeModel + Earlier Today - + Hoy + %1 items - + %1 elementos WBSearchLineEdit + Search - + Buscar WBTabBar + New &Tab - + Nueva &pestaña + Clone Tab - + Dupli. pestaña + &Close Tab - + &Cerrar pestaña + Close &Other Tabs - + Cerrar &otras pestañas + Reload Tab - + Recarg. pestaña + Reload All Tabs - + Recarg. todas pest. WBTabWidget + Recently Closed Tabs - + Pest. cerradas recientem. + + (Untitled) - + (sin título) WBToolbarSearch + Search - + Buscar + No Recent Searches - + Ninguna búsqu. reciente + Recent Searches - + Búsquedas recientes + Clear Recent Searches - + Limpiar búsqu. recientes WBWebPage - Download + Download PDF Document: would you prefer to download the PDF file or add it to the current Uniboard document? + Descargar documento PDF: ¿prefiere descargar el archivo PDF o añadirlo al documento Uniboard actual? + + + + Download PDF Document: would you prefer to download the PDF file or add it to the current Sankore document? + + Download + Descargar + + + Add to Current Document - + Añadir al documento actual + PDF - + PDF + Error loading page: %1 - - - - Download PDF Document: would you prefer to download the PDF file or add it to the current Sankore document? - + Error al cargar página: %1 WBWebView + Open in New Tab - + Abrir en nueva pestaña YouTubePublishingDialog + Publish Podcast to YouTube - + Publicar Podcast en YouTube + Title - + Título + Description - + Descripción + Keywords - + Claves + Uniboard - + Uniboard + Category - + Categoría + YouTube Username - + Usuario de YouTube + YouTube Password - + Contraseña de YouTube + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2199,234 +3262,315 @@ p, li { white-space: pre-wrap; } brushProperties - On Light Background - + + Opacity + Opacidad - On Dark Background - + + On Light Background + Con fondo claro - Opacity - + + On Dark Background + Con fondo oscuro + Line Width - + Ancho de línea + Medium - + Mediana + Strong - + Fuerte + Fine - + Fina + Pen is Pressure Sensitive - + El lápiz es sensible a la presión capturePublishingDialog + Dialog - + Diálogo + Title - + Título + E-mail - + Correo electrónico + Author - + Autor + Description - + Descripción documentPublishingDialog + Dialog - + Diálogo + Title - + Título + E-mail - + Correo electrónico + Author - + Autor + Description - + Descripción + Attach Downloadable PDF Version - + Adjuntar versión PDF descargable + Attach Downloadable Uniboard File (UBZ) - + Adjuntar archivo Uniboard descargable (UBZ) + Warning: This documents contains video, which will not be displayed properly on the Web - + Advertencia: Este documento contiene vídeo, que no se podrá ver bien en la Web documents + Uniboard Documents - - - - 1 - + Documentos Uniboard - preferencesDialog + library - Preferences - + Images + Imágenes - - version : … - + + New Folder + Nueva carpeta - Default Settings - + Sankore Library + Biblioteca Sankore - Close - + Iteractive Models + Modelos interactivos - Display - + Import to Library + Importar a biblioteca - Internet - + Shapes + Formas - Show Page with External Browser - + Movies + Vídeos - Home Page: - + Applications + Aplicaciones - Proxy User/Pass: - + Sounds + Sonidos - Virtual Keyboard - + Delete + Limpiar - Keyboard button size: - + Set as Background + Fijar como fondo - Toolbar - + Remove Background + Eliminar fondo + + + Add File to Page + Añadir archivo a pág. + + + Add to Page + Añadir a página + + + Add to Editor + Añadir al editor + + + + preferencesDialog + + + Preferences + Preferencias + + + + Default Settings + Preconfiguración + + Close + Cerrar + + + + Display + Pantalla + + + Indicators + Indicadores + + + + Show Page with External Browser + Mostrar página con navegador externo + + + Positioned at the Top (recommended for tablets) - + Posicionado arriba (recomendado para tablets) + Positioned at the Bottom (recommended for white boards) - + Posicionado abajo (recomendado para pizarras digitales) + Display Text Under Button - + Mostrar texto debajo del botón - Mirroring - + + Internet + Internet - Show main display immediately on secondary screen or projector - + + Home Page: + Pág. principal: - Stylus Palette - + + Proxy User/Pass: + Proxy Usuario/Contraseña: - Horizontal - + + Toolbar + Barra de herramientas - Vertical - + + Mirroring + Reflejo - Pen - + + Show main display immediately on secondary screen or projector + Mostrar pantalla principal de inmediato en pantalla secundaria o proyector - Marker - + + Virtual Keyboard + Teclado virtual - About - + Minimize keyboard when not active + Minimizar teclado cuando no esté activo - Software Update - + + Keyboard button size: + Tamaño de botones de teclado: - Check software update at launch - + + Stylus Palette + Estilo de la paleta - Licences - + + Horizontal + Horizontal - OpenSSl - + + Vertical + Vertical - zlib - + + Pen + Lápiz - xpdf - + + Marker + Rotulador - Quazip - + + Licences + Licencias - - Sankoré 3.1 - + + + OpenSSl + OpenSSl + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2436,6 +3580,12 @@ p, li { white-space: pre-wrap; } + + zlib + zlib + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2444,6 +3594,12 @@ p, li { white-space: pre-wrap; } + + xpdf + xpdf + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2452,6 +3608,12 @@ p, li { white-space: pre-wrap; } + + Quazip + Quazip + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2459,7 +3621,13 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt;">GNU Library or Lesser General Public License (LGPL), zlib/libpng License</span></p></body></html> + + + Sankoré 3.1 + Sankoré 3.1 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2637,7 +3805,13 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt;">Library.</span></p></body></html> - + + + About + Acerca de + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2650,7 +3824,8 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt; color:#35382a;">You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></p></body></html> - + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -2660,39 +3835,70 @@ p, li { white-space: pre-wrap; } + Network - + Red + Community - + Comunidad + User/Pass: - + Usuario/Contraseña: + + + Licence + Licencia + + + + Software Update + Actualización de la aplicación + + + + Check software update at launch + Comprobar actualización de la aplicación al inicio + + + Check for Software Updates Now + Buscar actualizaciones de SW ahora + + + + version : … + versión: … trapFlashDialog + Trap flash - + Trap flash + Select a flash to trap - + Selec. flash para capturar + about:blank - + about:blank + Application name - + Nombre de aplicación + Create Application - + Crear aplicación diff --git a/resources/images/libpalette/WebSearchCategory.svg b/resources/images/libpalette/WebSearchCategory.svg new file mode 100644 index 00000000..95b5e24e --- /dev/null +++ b/resources/images/libpalette/WebSearchCategory.svg @@ -0,0 +1,240 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/sankore.qrc b/resources/sankore.qrc index 4c7162ef..02e3c32e 100644 --- a/resources/sankore.qrc +++ b/resources/sankore.qrc @@ -319,7 +319,6 @@ images/pages_open.png images/cache_close.png images/cache_open.png - style.qss images/cache_circle.png images/cache_square.png images/down_arrow.png @@ -333,6 +332,8 @@ images/teacher_close.png images/teacher_open.png images/teacher_close_disabled.png + style.qss images/teacher_open_disabled.png + images/libpalette/WebSearchCategory.svg diff --git a/resources/style.qss b/resources/style.qss index 1c0ab3a3..8288ce28 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -1,13 +1,25 @@ QWidget#DockPaletteWidgetBox, QWidget#documentNavigator, -QWidget#UBLibraryWidget, QWidget#UBLibPathViewer, -QWidget#UBTeacherStudentAction +QWidget#UBTeacherStudentAction, +QWidget#UBLibNavigatorWidget, +QWidget#UBLibItemProperties { background: #EEEEEE; border-radius: 10px; border: 2px solid #999999; -/* padding-bottom: -2px; */ +} + +QWidget#UBLibWebView +{ + background: #EEEEEE; + border-radius : 10px; + border: 2px solid #999999; +} + +QWebView#SearchEngineView +{ + background:#EEEEEE; } QColorDialog @@ -121,8 +133,6 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical background:transparent; } - - QScrollBar::horizontal { background:transparent; @@ -166,7 +176,6 @@ QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal background:transparent; } - QSlider::handle::horizontal { background-color:#EEEEEE; diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 3ab4f111..2756f99a 100755 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -106,6 +106,11 @@ UBBoardPaletteManager::~UBBoardPaletteManager() delete mpLibWidget; mpLibWidget = NULL; } + if(NULL != mpTeacherBarWidget) + { + delete mpTeacherBarWidget; + mpTeacherBarWidget = NULL; + } if(NULL != mpCachePropWidget) { delete mpCachePropWidget; @@ -163,20 +168,20 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() mpPageNavigWidget = new UBPageNavigationWidget(); mpPageNavigWidget->registerMode(eUBDockPaletteWidget_BOARD); -// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpPageNavigWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); - +// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpPageNavigWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); + mpLibWidget = new UBLibWidget(); mpLibWidget ->registerMode(eUBDockPaletteWidget_BOARD); mpLibWidget ->registerMode(eUBDockPaletteWidget_DESKTOP); -// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpLibWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); +// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpLibWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); mpCachePropWidget = new UBCachePropertiesWidget(); mpCachePropWidget->registerMode(eUBDockPaletteWidget_BOARD); -// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpCachePropWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); +// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpCachePropWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); mpTeacherBarWidget = new UBTeacherBarWidget(); mpTeacherBarWidget->registerMode(eUBDockPaletteWidget_BOARD); -// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpTeacherBarWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); +// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpTeacherBarWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); //------------------------------------------------// // Add the dock palettes @@ -259,8 +264,8 @@ void UBBoardPaletteManager::slot_changeMainMode(UBApplicationController::MainMod void UBBoardPaletteManager::slot_changeDesktopMode(bool isDesktop) { UBApplicationController::MainMode currMode = UBApplication::applicationController->displayMode(); - if(!isDesktop) - { + if(!isDesktop) + { switch( currMode ) { case UBApplicationController::Board: @@ -269,10 +274,10 @@ void UBBoardPaletteManager::slot_changeDesktopMode(bool isDesktop) default: break; - } - } + } + } else - changeMode(eUBDockPaletteWidget_DESKTOP); + changeMode(eUBDockPaletteWidget_DESKTOP); } void UBBoardPaletteManager::setupPalettes() @@ -994,4 +999,4 @@ void UBBoardPaletteManager::refreshPalettes() { mRightPalette->update(); mLeftPalette->update(); -} \ No newline at end of file +} diff --git a/src/board/UBBoardPaletteManager.h b/src/board/UBBoardPaletteManager.h index 5b3ee587..a151bab0 100644 --- a/src/board/UBBoardPaletteManager.h +++ b/src/board/UBBoardPaletteManager.h @@ -26,7 +26,6 @@ #include "gui/UBLibWidget.h" #include "gui/UBCachePropertiesWidget.h" #include "gui/UBTeacherBarWidget.h" - #include "core/UBApplicationController.h" diff --git a/src/board/UBLibraryController.cpp b/src/board/UBLibraryController.cpp index 1a4a42a1..d2d66716 100644 --- a/src/board/UBLibraryController.cpp +++ b/src/board/UBLibraryController.cpp @@ -222,7 +222,6 @@ QList UBLibraryController::rootCategoriesList() element->setMoveable(false); categories << element; - element = new UBLibElement(eUBLibElementType_Folder, mInteractiveUserDirectoryPath, tr("Applications", "Applications category element")); element->setThumbnail(QImage(":images/libpalette/ApplicationsCategory.svg")); element->setMoveable(false); @@ -239,11 +238,20 @@ QList UBLibraryController::rootCategoriesList() element->setMoveable(false); categories << element; +// Note : FEATURE IN DEVELOPMENT, DO NOT ERASE (or you will get problems) !!!! +// mSearchCategoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardSearchDirectory()); +// element = new UBLibElement(eUBLibElementType_Folder, mSearchCategoryPath, tr("Web Search", "Web search category element")); +// element->setThumbnail(QImage(":images/libpalette/WebSearchCategory.svg")); +// element->setMoveable(false); +// categories << element; + element = new UBLibElement(eUBLibElementType_Folder, mAnimationUserDirectoryPath, tr("Animations", "Animations category element")); element->setThumbnail(QImage(":images/libpalette/FlashCategory.svg")); element->setMoveable(false); categories << element; + + categories << UBLibElement::trashElement(); return categories; @@ -759,6 +767,31 @@ void UBChainedLibElement::setNextElement(UBChainedLibElement *nextElem) mpNextElem = nextElem; } +UBChainedLibElement* UBChainedLibElement::lastElement() +{ + UBChainedLibElement* pElem = NULL; + + if(NULL != mpNextElem) + { + UBChainedLibElement* pLast = mpNextElem->lastElement(); + if(NULL != pLast) + { + pElem = pLast; + } + else + { + pElem = mpNextElem; + } + } + + return pElem; +} + +QUrl UBChainedLibElement::lastItemPath() +{ + return lastElement()->element()->path(); +} + UBLibElement* UBLibElement::trashElement() { UBLibElement *trashElement; diff --git a/src/board/UBLibraryController.h b/src/board/UBLibraryController.h index 009114ef..9903260d 100644 --- a/src/board/UBLibraryController.h +++ b/src/board/UBLibraryController.h @@ -82,8 +82,10 @@ public: ~UBChainedLibElement(); UBChainedLibElement* nextElement(){return mpNextElem;} + UBChainedLibElement* lastElement(); void setNextElement(UBChainedLibElement* nextElem); UBLibElement* element(){return mpElem;} + QUrl lastItemPath(); private: UBLibElement* mpElem; @@ -160,6 +162,7 @@ class UBLibraryController : public QObject QUrl mInteractiveUserDirectoryPath; QUrl mInteractiveCategoryPath; QUrl mAnimationUserDirectoryPath; + QUrl mSearchCategoryPath; QStringList addItemsToCurrentLibrary(const QDir& pSelectedFolder, const QStringList& pExtensions); diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 6000f097..efece366 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -566,9 +566,7 @@ void UBApplicationController::downloadJsonFinished(QString currentJson) } else { if (isNoUpdateDisplayed) { - QMessageBox msgBox; - msgBox.setText (tr ("No update available")); - msgBox.exec(); + mMainWindow->information(tr("Update"), tr("No update available")); } } } diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 5e3449f5..8c2f3f95 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -14,6 +14,7 @@ */ #include "UBPersistenceManager.h" +#include "gui/UBMainWindow.h" #include @@ -1005,11 +1006,7 @@ void UBPersistenceManager::checkIfDocumentRepositoryExists() QString humanPath = QDir::cleanPath(mDocumentRepositoryPath); humanPath = QDir::toNativeSeparators(humanPath); - QMessageBox::question( - QApplication::activeWindow(), - tr("Document Repository Loss"), - tr("Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath), - QMessageBox::Yes); + UBApplication::mainWindow->warning(tr("Document Repository Loss"),tr("Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath)); UBApplication::quit(); } diff --git a/src/core/UBPersistenceManager.h b/src/core/UBPersistenceManager.h index 3c224f04..98a296f6 100644 --- a/src/core/UBPersistenceManager.h +++ b/src/core/UBPersistenceManager.h @@ -74,8 +74,8 @@ class UBPersistenceManager : public QObject virtual void persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex); - virtual void persistTeacherBar(UBDocumentProxy* pDocumentProxy, int page, sTeacherBarInfos infos); + sTeacherBarInfos getTeacherBarInfos(UBDocumentProxy* pDocumentProxy, int page); virtual UBGraphicsScene* createDocumentSceneAt(UBDocumentProxy* pDocumentProxy, int index); diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 68fa5c88..54631f21 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -1020,6 +1020,15 @@ QString UBSettings::uniboardGipLibraryDirectory() return dirPath; } +QString UBSettings::uniboardSearchDirectory() +{ + QString dirPath = UBPlatformUtils::applicationResourcesDirectory() + "/library/search"; + if (!QDir(dirPath).exists()) + QDir().mkpath(dirPath); + + return dirPath; +} + QString UBSettings::uniboardImageLibraryDirectory() { QString defaultRelativePath = QString("./library/image"); diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index 8c1d2d60..f1e1a938 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -112,6 +112,7 @@ class UBSettings : public QObject QString uniboardImageLibraryDirectory(); QString uniboardUserImageDirectory(); QString defaultUserImagesDirectory(); + QString uniboardSearchDirectory(); QString uniboardUserVideoDirectory(); QString uniboardDefaultUserImageLibraryDirectory(); diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index 00f1f200..ea5d792c 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -193,6 +193,7 @@ bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) bool UBGraphicsItemDelegate::weelEvent(QGraphicsSceneWheelEvent *event) { + Q_UNUSED(event); if( mDelegated->isSelected() ) { // event->accept(); diff --git a/src/frameworks/UBFileSystemUtils.cpp b/src/frameworks/UBFileSystemUtils.cpp index cd789784..1c315dfe 100644 --- a/src/frameworks/UBFileSystemUtils.cpp +++ b/src/frameworks/UBFileSystemUtils.cpp @@ -334,7 +334,7 @@ QString UBFileSystemUtils::mimeTypeFromFileName(const QString& fileName) { QString ext = extension(fileName); - if (ext == "xls" || ext == "xlsx") return "application/msexcel"; + if (ext == "xls" || ext == "xlsx") return "application/msexcel"; if (ext == "ppt" || ext == "pptx") return "application/mspowerpoint"; if (ext == "ief") return "image/ief"; if (ext == "m3u") return "audio/x-mpegurl"; @@ -396,6 +396,7 @@ QString UBFileSystemUtils::mimeTypeFromFileName(const QString& fileName) if (ext == "m4v") return "video/x-m4v"; // W3C widget if (ext == "wgt") return "application/widget"; + if (ext == "wgs") return "application/search"; // Apple widget if (ext == "wdgt") return "application/vnd.apple-widget"; //mime type invented by us :-( if (ext == "swf") return "application/x-shockwave-flash"; diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index 74bd3611..371cdbd5 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -141,7 +141,10 @@ void UBDocumentNavigator::updateSpecificThumbnail(int iPage) { // Save the current state of the scene pScene->setModified(true); - UBSvgSubsetAdaptor::persistScene(mCrntDoc,pScene, iPage); + if(UBApplication::boardController) + { + UBApplication::boardController->persistCurrentScene(); + } UBThumbnailAdaptor::persistScene(mCrntDoc->persistencePath(), pScene, iPage); diff --git a/src/gui/UBLibItemProperties.cpp b/src/gui/UBLibItemProperties.cpp index 1b47fbef..a8cb3cb0 100644 --- a/src/gui/UBLibItemProperties.cpp +++ b/src/gui/UBLibItemProperties.cpp @@ -38,38 +38,16 @@ UBLibItemProperties::UBLibItemProperties(QWidget *parent, const char *name):QWid , mpThumbnail(NULL) , mpOrigPixmap(NULL) , mpElement(NULL) - , mpNavigBar(NULL) - , mpNavigLayout(NULL) - , mpNavigBack(NULL) - , mpNavigBackAction(NULL) { setObjectName(name); + setAttribute(Qt::WA_StyledBackground, true); + setStyleSheet(UBApplication::globalStyleSheet()); + // Create the GUI mpLayout = new QVBoxLayout(this); setLayout(mpLayout); - mpNavigBar = new QWidget(this); - mpNavigLayout = new QHBoxLayout(mpNavigBar); - mpNavigBar->setLayout(mpNavigLayout); - mpNavigBar->setStyleSheet(QString("background-color : white; border-radius : 10px;")); - mpNavigBar->setMaximumHeight(42); - mpNavigBackAction = new QAction(QIcon(":/images/libpalette/back.png"), tr("Back"), mpNavigBar); - mpNavigBack = new QToolButton(mpNavigBar); - mpNavigBar->addAction(mpNavigBackAction); - mpNavigBack->setDefaultAction(mpNavigBackAction); - mpNavigBack->setIconSize(QSize(32,32)); - mpNavigBack->setToolButtonStyle(Qt::ToolButtonIconOnly); - mpNavigBack->setStyleSheet(QString("QToolButton {color: white; font-weight: bold; font-family: Arial; background-color: transparent; border: none}")); - mpNavigBack->setFocusPolicy(Qt::NoFocus); - - mpNavigLayout->addWidget(mpNavigBack, 0); - connect(mpNavigBackAction, SIGNAL(triggered()), this, SLOT(onBack())); - - mpNavigLayout->addStretch(1); - - mpLayout->addWidget(mpNavigBar); - maxThumbHeight = height() / 4; mpThumbnail = new QLabel(); @@ -77,7 +55,8 @@ UBLibItemProperties::UBLibItemProperties(QWidget *parent, const char *name):QWid icon.scaledToWidth(THUMBNAIL_WIDTH); mpThumbnail->setPixmap(icon); - mpThumbnail->setStyleSheet(QString("background-color : white; padding : 10 px; border-radius : 10px;")); + mpThumbnail->setObjectName("DockPaletteWidgetBox"); + mpThumbnail->setStyleSheet("background:white;"); mpThumbnail->setAlignment(Qt::AlignHCenter); mpLayout->addWidget(mpThumbnail, 0); @@ -104,7 +83,8 @@ UBLibItemProperties::UBLibItemProperties(QWidget *parent, const char *name):QWid mpObjInfos = new QTextEdit(this); mpObjInfos->setReadOnly(true); - mpObjInfos->setStyleSheet(QString("background-color: white; border-radius : 10px;")); + mpObjInfos->setObjectName("DockPaletteWidgetBox"); + mpObjInfos->setStyleSheet("background:white;"); mpLayout->addWidget(mpObjInfos, 1); connect(mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage())); @@ -118,26 +98,6 @@ UBLibItemProperties::UBLibItemProperties(QWidget *parent, const char *name):QWid */ UBLibItemProperties::~UBLibItemProperties() { - if(NULL != mpNavigBackAction) - { - delete mpNavigBackAction; - mpNavigBackAction = NULL; - } - if(NULL != mpNavigBack) - { - delete mpNavigBack; - mpNavigBack = NULL; - } - if(NULL != mpNavigLayout) - { - delete mpNavigLayout; - mpNavigLayout = NULL; - } - if(NULL != mpNavigBar) - { - delete mpNavigLayout; - mpNavigLayout = NULL; - } if(NULL != mpOrigPixmap) { delete mpOrigPixmap; @@ -148,11 +108,6 @@ UBLibItemProperties::~UBLibItemProperties() delete mpLayout; mpLayout = NULL; } - //if(NULL != mpButtonLayout) - //{ - // delete mpButtonLayout; - // mpButtonLayout = NULL; - //} if(NULL != mpSetAsBackgroundButton) { delete mpSetAsBackgroundButton; @@ -211,10 +166,6 @@ void UBLibItemProperties::adaptSize() mpThumbnail->setPixmap(mpOrigPixmap->scaledToWidth(THUMBNAIL_WIDTH)); } } - if(NULL != mpNavigBar) - { - mpNavigBar->resize(width(), mpNavigBar->height()); - } } /** diff --git a/src/gui/UBLibItemProperties.h b/src/gui/UBLibItemProperties.h index 1490002b..3ec7976b 100644 --- a/src/gui/UBLibItemProperties.h +++ b/src/gui/UBLibItemProperties.h @@ -73,12 +73,6 @@ private: QPixmap* mpOrigPixmap; int maxThumbHeight; UBLibElement* mpElement; - - // Navigation bar - QWidget* mpNavigBar; - QHBoxLayout* mpNavigLayout; - QToolButton* mpNavigBack; - QAction* mpNavigBackAction; }; diff --git a/src/gui/UBLibNavigatorWidget.cpp b/src/gui/UBLibNavigatorWidget.cpp index ef4109ef..f65c97f8 100644 --- a/src/gui/UBLibNavigatorWidget.cpp +++ b/src/gui/UBLibNavigatorWidget.cpp @@ -15,6 +15,7 @@ #include "UBLibNavigatorWidget.h" #include "UBLibWidget.h" +#include "core/UBApplication.h" #include "core/memcheck.h" static int lowBoundForSlider = 40; @@ -29,22 +30,20 @@ static int tickIntervalForSlider = 10; UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QWidget(parent) , mLayout(NULL) , mLibWidget(NULL) - , mPathViewer(NULL) , mSlider(NULL) , mSliderWidthSetting(NULL) { setObjectName(name); + + setAttribute(Qt::WA_StyledBackground, true); + setStyleSheet(UBApplication::globalStyleSheet()); + setAcceptDrops(true); UBLibWidget* libWidget = dynamic_cast(parentWidget()); - mLayout = new QVBoxLayout(this); setLayout(mLayout); - mPathViewer = new UBLibPathViewer(this); - mPathViewer->setMaximumHeight(62); - mLayout->addWidget(mPathViewer, 0); - mLibWidget = new UBLibraryWidget(this); mLayout->addWidget(mLibWidget, 1); @@ -56,27 +55,25 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW mSlider->setValue(defaultWidth); mSlider->setTickInterval(tickIntervalForSlider); mLayout->addWidget(mSlider, 0); - mLibWidget->updateThumbnailsSize(defaultWidth); connect(mLibWidget, SIGNAL(navigBarUpdate(UBLibElement*)), this, SLOT(onNavigbarUpate(UBLibElement*))); - connect(mLibWidget, SIGNAL(propertiesRequested(UBLibElement*)), this, SLOT(onPropertiesRequested(UBLibElement*))); - connect(mPathViewer, SIGNAL(mouseClick(UBChainedLibElement*)), this, SLOT(onPathItemClicked(UBChainedLibElement*))); - connect(mSlider,SIGNAL(valueChanged(int)),this,SLOT(updateThumbnailsSize(int))); - connect(mPathViewer, SIGNAL(elementsDropped(QList,UBLibElement*)), mLibWidget, SLOT(onElementsDropped(QList,UBLibElement*))); + connect(this, SIGNAL(updateNavigBar(UBChainedLibElement*)), libWidget, SLOT(onUpdateNavigBar(UBChainedLibElement*))); + mLibWidget->updateThumbnailsSize(defaultWidth); + connect(mLibWidget, SIGNAL(propertiesRequested(UBLibElement*)), this, SLOT(onPropertiesRequested(UBLibElement*))); + connect(mLibWidget, SIGNAL(displaySearchEngine(UBLibElement*)), this, SLOT(onDisplaySearchEngine(UBLibElement*))); + connect(mSlider,SIGNAL(valueChanged(int)),this,SLOT(updateThumbnailsSize(int))); + connect(libWidget->pathViewer(), SIGNAL(mouseClick(UBChainedLibElement*)), this, SLOT(onPathItemClicked(UBChainedLibElement*))); + connect(libWidget->pathViewer(), SIGNAL(elementsDropped(QList,UBLibElement*)), mLibWidget, SLOT(onElementsDropped(QList,UBLibElement*))); connect(mLibWidget, SIGNAL(navigBarUpdate(UBLibElement*)), libWidget->actionBar(), SLOT(onNavigbarUpdate(UBLibElement*))); connect(mLibWidget, SIGNAL(itemsSelected(QList, bool)), libWidget->actionBar(), SLOT(onSelectionChanged(QList, bool))); connect(libWidget->actionBar(), SIGNAL(deleteDone()), mLibWidget, SLOT(onRefreshCurrentFolder())); connect(mLibWidget, SIGNAL(favoritesEntered(bool)), libWidget->actionBar(), SLOT(onFavoritesEntered(bool))); connect(libWidget->actionBar(), SIGNAL(searchElement(QString)), mLibWidget, SLOT(onSearchElement(QString))); connect(libWidget->actionBar(), SIGNAL(newFolderToCreate()), mLibWidget, SLOT(onNewFolderToCreate())); - - - /*** to update the search bar **/ connect(mLibWidget, SIGNAL(itemClicked()),libWidget->actionBar(), SLOT(onItemChanged())); - connect(mPathViewer, SIGNAL(mouseClick(UBChainedLibElement*)),libWidget->actionBar(), SLOT(onItemChanged())); - + connect(libWidget->pathViewer(), SIGNAL(mouseClick(UBChainedLibElement*)),libWidget->actionBar(), SLOT(onItemChanged())); mLibWidget->init(); } @@ -85,10 +82,10 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW */ UBLibNavigatorWidget::~UBLibNavigatorWidget() { - if(NULL != mPathViewer) + if(NULL != mLibWidget) { - delete mPathViewer; - mPathViewer = NULL; + delete mLibWidget; + mLibWidget = NULL; } if(NULL != mSlider) { @@ -100,6 +97,11 @@ UBLibNavigatorWidget::~UBLibNavigatorWidget() delete mSliderWidthSetting; mSliderWidthSetting = NULL; } + if(NULL != mLayout) + { + delete mLayout; + mLayout = NULL; + } } void UBLibNavigatorWidget::dropMe(const QMimeData *_data) @@ -114,14 +116,8 @@ void UBLibNavigatorWidget::dropMe(const QMimeData *_data) */ void UBLibNavigatorWidget::onNavigbarUpate(UBLibElement *pElem) { - if(NULL != pElem) - { - // Refresh the path navigator - mPathViewer->displayPath(mLibWidget->chainedElements); - - // Show the path navigator - mPathViewer->show(); - } + Q_UNUSED(pElem); + emit updateNavigBar(mLibWidget->chainedElements); } /** @@ -157,13 +153,22 @@ void UBLibNavigatorWidget::removeNextChainedElements(UBChainedLibElement *fromEl /** * \brief Handles the properties requested event - * @param elem as tje related element + * @param elem as the related element */ void UBLibNavigatorWidget::onPropertiesRequested(UBLibElement *elem) { emit propertiesRequested(elem); } +/** + * \brief Handles the display search engine requested event + * @param elem as the related element + */ +void UBLibNavigatorWidget::onDisplaySearchEngine(UBLibElement *elem) +{ + emit displaySearchEngine(elem); +} + /** * \brief Update the thumbnails size * @param newSize as the given thumbnails size diff --git a/src/gui/UBLibNavigatorWidget.h b/src/gui/UBLibNavigatorWidget.h index a8750b38..6fc52ee7 100644 --- a/src/gui/UBLibNavigatorWidget.h +++ b/src/gui/UBLibNavigatorWidget.h @@ -21,7 +21,6 @@ #include #include "UBLibraryWidget.h" -#include "UBLibPathViewer.h" #include "core/UBSetting.h" class UBLibNavigatorWidget : public QWidget @@ -32,24 +31,25 @@ public: ~UBLibNavigatorWidget(); void dropMe(const QMimeData* _data); - UBLibraryWidget* libraryWidget(){return mLibWidget;}; + UBLibraryWidget* libraryWidget(){return mLibWidget;} signals: void propertiesRequested(UBLibElement* elem); + void displaySearchEngine(UBLibElement* elem); + void updateNavigBar(UBChainedLibElement* elem); private slots: void onNavigbarUpate(UBLibElement* pElem); void onPathItemClicked(UBChainedLibElement *elem); void onPropertiesRequested(UBLibElement* elem); void updateThumbnailsSize(int newSize); + void onDisplaySearchEngine(UBLibElement* elem); private: void removeNextChainedElements(UBChainedLibElement* fromElem); - QVBoxLayout* mLayout; UBLibraryWidget* mLibWidget; - UBLibPathViewer* mPathViewer; QSlider* mSlider; UBSetting* mSliderWidthSetting; }; diff --git a/src/gui/UBLibPathViewer.cpp b/src/gui/UBLibPathViewer.cpp index 39af07e7..79a532b2 100644 --- a/src/gui/UBLibPathViewer.cpp +++ b/src/gui/UBLibPathViewer.cpp @@ -29,15 +29,21 @@ */ UBLibPathViewer::UBLibPathViewer(QWidget *parent, const char *name):QGraphicsView(parent) , mpElems(NULL) + , mpElemsBackup(NULL) , mpScene(NULL) , mpLayout(NULL) , mpContainer(NULL) + , mpBackElem(NULL) { setObjectName(name); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); setAcceptDrops(true); + mpBackElem = new UBLibElement(); + mpBackElem->setThumbnail(QPixmap(":images/libpalette/back.png").toImage()); + mpBackElem->setDeletable(false); + mpScene = new UBPathScene(this); setScene(mpScene); @@ -57,21 +63,31 @@ UBLibPathViewer::UBLibPathViewer(QWidget *parent, const char *name):QGraphicsVie */ UBLibPathViewer::~UBLibPathViewer() { -// if(NULL != mpLayout) -// { -// delete mpLayout; -// mpLayout = NULL; -// } if(NULL != mpContainer) { delete mpContainer; mpContainer = NULL; } + if(NULL != mpBackElem) + { + delete mpBackElem; + mpBackElem = NULL; + } if(NULL != mpElems) { delete mpElems; mpElems = NULL; } + if(NULL != mpElemsBackup) + { + delete mpElemsBackup; + mpElemsBackup = NULL; + } + if(NULL != mpLayout) + { + delete mpLayout; + mpLayout = NULL; + } if(NULL != mpScene) { delete mpScene; @@ -255,6 +271,24 @@ void UBLibPathViewer::onElementsDropped(QList elements, UBLibElement *t emit elementsDropped(elements, target); } +void UBLibPathViewer::showBack() +{ + // Backup the current path so we can go back by clicking on the back button + mpElemsBackup = mpElems; + + // Set the correct path to the backElem + UBChainedLibElement* pLastElem = mpElemsBackup->lastElement(); + + if(NULL != pLastElem) + { + mpBackElem->setPath(pLastElem->element()->path()); + mpBackElem->setType(eUBLibElementType_Folder); + mpBackElem->setName(pLastElem->element()->name()); + } + + // Display the 'back' element + displayPath(new UBChainedLibElement(mpBackElem)); +} UBFolderPath::UBFolderPath():QGraphicsProxyWidget() { @@ -422,7 +456,6 @@ void UBPathScene::dragMoveEvent(QGraphicsSceneDragDropEvent *event) void UBPathScene::dropEvent(QGraphicsSceneDragDropEvent *event) { const QMimeData* pMimeData = event->mimeData(); - qDebug() << " Drop source : " << event->source()->metaObject()->className(); if(0 == QString::compare(event->source()->metaObject()->className(), "UBLibraryWidget")) { diff --git a/src/gui/UBLibPathViewer.h b/src/gui/UBLibPathViewer.h index 7e44810f..ab7083d5 100644 --- a/src/gui/UBLibPathViewer.h +++ b/src/gui/UBLibPathViewer.h @@ -79,6 +79,10 @@ public: void displayPath(UBChainedLibElement* elementsChain); int widgetAt(QPointF p); void updateScrolls(); + +public slots: + void showBack(); + signals: void mouseClick(UBChainedLibElement* elem); void elementsDropped(QList elements, UBLibElement* target); @@ -99,6 +103,8 @@ private: /** The chained path elements */ UBChainedLibElement* mpElems; + /** The backup chained path elements */ + UBChainedLibElement* mpElemsBackup; /** The scene */ UBPathScene* mpScene; //QGraphicsScene* mpScene; @@ -110,6 +116,8 @@ private: QVector mVItems; /** The total width of the element in the scene */ int mSceneWidth; + /** The back element */ + UBLibElement* mpBackElem; }; diff --git a/src/gui/UBLibWebView.cpp b/src/gui/UBLibWebView.cpp new file mode 100644 index 00000000..d939654d --- /dev/null +++ b/src/gui/UBLibWebView.cpp @@ -0,0 +1,86 @@ +#include + +#include "core/UBApplication.h" + +#include "UBLibWebView.h" + +UBLibWebView::UBLibWebView(QWidget* parent, const char* name):QWidget(parent) + , mpView(NULL) + , mpWebSettings(NULL) + , mpLayout(NULL) +{ + setObjectName(name); + + setAttribute(Qt::WA_StyledBackground, true); + setStyleSheet(UBApplication::globalStyleSheet()); + + mpLayout = new QVBoxLayout(); + setLayout(mpLayout); + + mpView = new QWebView(this); + mpView->setObjectName("SearchEngineView"); + //mpView->setStyleSheet(QString("background-color:white;")); + + mpWebSettings = QWebSettings::globalSettings(); + mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true); + mpWebSettings->setAttribute(QWebSettings::PluginsEnabled, true); + mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true); + mpWebSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true); + mpWebSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true); + mpWebSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); + mpWebSettings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true); + mpWebSettings->setAttribute(QWebSettings::DnsPrefetchEnabled, true); + + mpLayout->addWidget(mpView); +} + +UBLibWebView::~UBLibWebView() +{ + if(NULL != mpView) + { + delete mpView; + mpView = NULL; + } + if(NULL != mpLayout) + { + delete mpLayout; + mpLayout = NULL; + } +} + +void UBLibWebView::setElement(UBLibElement *elem) +{ + if(NULL != elem) + { + QString qsWidgetName; + QString path = elem->path().toLocalFile(); + + QString qsConfigPath = QString("%0/config.xml").arg(path); + + if(QFile::exists(qsConfigPath)) + { + QFile f(qsConfigPath); + if(f.open(QIODevice::ReadOnly)) + { + QDomDocument domDoc; + domDoc.setContent(QString(f.readAll())); + QDomElement root = domDoc.documentElement(); + + QDomNode node = root.firstChild(); + while(!node.isNull()) + { + if(node.toElement().tagName() == "content") + { + QDomAttr srcAttr = node.toElement().attributeNode("src"); + qsWidgetName = srcAttr.value(); + break; + } + node = node.nextSibling(); + } + f.close(); + } + } + + mpView->load(QUrl::fromLocalFile(QString("%0/%1").arg(path).arg(qsWidgetName))); + } +} diff --git a/src/gui/UBLibWebView.h b/src/gui/UBLibWebView.h new file mode 100644 index 00000000..b661125f --- /dev/null +++ b/src/gui/UBLibWebView.h @@ -0,0 +1,27 @@ +#ifndef UBLIBWEBVIEW_H +#define UBLIBWEBVIEW_H + +#include +#include +#include +#include + +#include "board/UBLibraryController.h" + +class UBLibWebView : public QWidget +{ + Q_OBJECT + +public: + UBLibWebView(QWidget* parent = 0, const char* name = "UBLibWebView"); + ~UBLibWebView(); + + void setElement(UBLibElement* elem); + +private: + QWebView* mpView; + QWebSettings* mpWebSettings; + QVBoxLayout* mpLayout; +}; + +#endif // UBLIBWEBVIEW_H diff --git a/src/gui/UBLibWidget.cpp b/src/gui/UBLibWidget.cpp index 51ffdc16..aa2d996a 100644 --- a/src/gui/UBLibWidget.cpp +++ b/src/gui/UBLibWidget.cpp @@ -29,6 +29,8 @@ UBLibWidget::UBLibWidget(QWidget *parent, const char *name):UBDockPaletteWidget( , mNavigator(NULL) , mProperties(NULL) , mActionBar(NULL) + , mpWebView(NULL) + , mpPathViewer(NULL) { setObjectName(name); mName = "LibWidget"; @@ -43,23 +45,37 @@ UBLibWidget::UBLibWidget(QWidget *parent, const char *name):UBDockPaletteWidget( mLayout = new QVBoxLayout(this); setLayout(mLayout); + // ------------- // Build the GUI + // ------------- + // The 'global' widgets mStackedWidget = new QStackedWidget(this); mActionBar = new UBLibActionBar(this); + mpPathViewer = new UBLibPathViewer(this); + mpPathViewer->setMaximumHeight(62); + + // The internal widgets mNavigator = new UBLibNavigatorWidget(this); mProperties = new UBLibItemProperties(this); + mpWebView = new UBLibWebView(this); + mLayout->addWidget(mpPathViewer, 0); mLayout->addWidget(mStackedWidget, 1); mLayout->addWidget(mActionBar, 0); mStackedWidget->addWidget(mNavigator); mStackedWidget->addWidget(mProperties); + mStackedWidget->addWidget(mpWebView); mStackedWidget->setCurrentIndex(ID_NAVIGATOR); miCrntStackWidget = ID_NAVIGATOR; + connect(mNavigator, SIGNAL(updateNavigBar(UBChainedLibElement*)), this, SLOT(onUpdateNavigBar(UBChainedLibElement*))); connect(mNavigator, SIGNAL(propertiesRequested(UBLibElement*)), this, SLOT(showProperties(UBLibElement*))); + connect(mNavigator, SIGNAL(displaySearchEngine(UBLibElement*)), this, SLOT(showSearchEngine(UBLibElement*))); connect(mProperties, SIGNAL(showFolderContent()), this, SLOT(showFolder())); + connect(this, SIGNAL(showLibElemProperties()), mpPathViewer, SLOT(showBack())); + connect(this, SIGNAL(showLibSearchEngine()), mpPathViewer, SLOT(showBack())); } /** @@ -67,16 +83,41 @@ UBLibWidget::UBLibWidget(QWidget *parent, const char *name):UBDockPaletteWidget( */ UBLibWidget::~UBLibWidget() { + if(NULL != mpPathViewer) + { + delete mpPathViewer; + mpPathViewer = NULL; + } + if(NULL != mNavigator) + { + delete mNavigator; + mNavigator = NULL; + } + if(NULL != mpWebView) + { + delete mpWebView; + mpWebView = NULL; + } if(NULL != mProperties) { delete mProperties; mProperties = NULL; } + if(NULL != mStackedWidget) + { + delete mStackedWidget; + mStackedWidget = NULL; + } if(NULL != mActionBar) { delete mActionBar; mActionBar = NULL; } + if(NULL != mLayout) + { + delete mLayout; + mLayout = NULL; + } } /** @@ -133,14 +174,26 @@ void UBLibWidget::showProperties(UBLibElement *elem) { if(NULL != elem) { + emit showLibElemProperties(); mActionBar->setButtons(eButtonSet_Properties); - // Show the properties of this object mProperties->showElement(elem); mStackedWidget->setCurrentIndex(ID_PROPERTIES); miCrntStackWidget = ID_PROPERTIES; } } +void UBLibWidget::showSearchEngine(UBLibElement *elem) +{ + if(NULL != elem) + { + emit showLibSearchEngine(); + mActionBar->hide(); + mpWebView->setElement(elem); + mStackedWidget->setCurrentIndex(ID_WEBVIEW); + miCrntStackWidget = ID_WEBVIEW; + } +} + void UBLibWidget::showFolder() { mActionBar->setButtons(mActionBar->previousButtonSet()); @@ -157,3 +210,14 @@ int UBLibWidget::border() { return 15; } + +void UBLibWidget::onUpdateNavigBar(UBChainedLibElement *elem) +{ + mpPathViewer->displayPath(elem); + mpPathViewer->show(); + + if(ID_NAVIGATOR != miCrntStackWidget) + { + showFolder(); + } +} diff --git a/src/gui/UBLibWidget.h b/src/gui/UBLibWidget.h index 644bd93f..e20088c1 100644 --- a/src/gui/UBLibWidget.h +++ b/src/gui/UBLibWidget.h @@ -30,9 +30,12 @@ #include "UBLibNavigatorWidget.h" #include "UBLibItemProperties.h" #include "UBLibActionBar.h" +#include "UBLibWebView.h" +#include "UBLibPathViewer.h" #define ID_NAVIGATOR 0 #define ID_PROPERTIES 1 +#define ID_WEBVIEW 2 class UBLibWidget : public UBDockPaletteWidget { @@ -42,10 +45,13 @@ public: ~UBLibWidget(); UBLibActionBar* actionBar(){return mActionBar;} - UBLibNavigatorWidget* libNavigator() {return mNavigator;}; + UBLibNavigatorWidget* libNavigator() {return mNavigator;} + UBLibPathViewer* pathViewer() {return mpPathViewer;} signals: void resized(); + void showLibElemProperties(); + void showLibSearchEngine(); protected: void dragEnterEvent(QDragEnterEvent* pEvent); @@ -55,7 +61,9 @@ protected: private slots: void showProperties(UBLibElement* elem); + void showSearchEngine(UBLibElement* elem); void showFolder(); + void onUpdateNavigBar(UBChainedLibElement* elem); private: void processMimeData(const QMimeData* pData); @@ -74,6 +82,10 @@ private: UBLibActionBar* mActionBar; /** The current stack widget index*/ int miCrntStackWidget; + /** The webview used to display the search engines */ + UBLibWebView* mpWebView; + /** The path navigation widget */ + UBLibPathViewer* mpPathViewer; }; #endif // UBLIBWIDGET_H diff --git a/src/gui/UBLibraryWidget.cpp b/src/gui/UBLibraryWidget.cpp index f0f34905..ab066eb9 100644 --- a/src/gui/UBLibraryWidget.cpp +++ b/src/gui/UBLibraryWidget.cpp @@ -25,15 +25,18 @@ #include "core/memcheck.h" +#include "frameworks/UBFileSystemUtils.h" + /** * \brief Constructor * @param parent as the parent widget * @param name as the widget object name */ UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailWidget(parent) - , chainedElements(NULL) - , mpCrntDir(NULL) - , mpCrntElem(NULL) + , chainedElements(NULL) + , mpCrntDir(NULL) + , mpCrntElem(NULL) + , mLibraryController(NULL) { setObjectName(name); setSpacing(5); @@ -45,7 +48,8 @@ UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailW */ UBLibraryWidget::~UBLibraryWidget() { - if(mLibraryController){ + if(NULL != mLibraryController) + { delete mLibraryController; mLibraryController = NULL; } @@ -148,7 +152,8 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index) { delete mpCrntElem; mpCrntElem = new UBLibElement(pElem); - if(eUBLibElementType_Folder == pElem->type() || eUBLibElementType_VirtualFolder == pElem->type()) { + if(eUBLibElementType_Folder == pElem->type() || eUBLibElementType_VirtualFolder == pElem->type()) + { // Add the clicked element to the end of the elements list // (at this level, the user can only go down in the path) UBChainedLibElement* pNextElem = new UBChainedLibElement(pElem); @@ -162,8 +167,15 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index) } else { - // Display the properties view - emit propertiesRequested(pElem); + if ("application/search" == UBFileSystemUtils::mimeTypeFromFileName(pElem->path().toLocalFile())) + { + emit displaySearchEngine(pElem); + } + else + { + // Display the properties view + emit propertiesRequested(pElem); + } } } emit itemClicked(); diff --git a/src/gui/UBLibraryWidget.h b/src/gui/UBLibraryWidget.h index 5aed86b7..d0420c76 100644 --- a/src/gui/UBLibraryWidget.h +++ b/src/gui/UBLibraryWidget.h @@ -47,7 +47,7 @@ public: void updateThumbnailsSize(int newSize); void init(); - UBLibraryController* libraryController() {return mLibraryController;}; + UBLibraryController* libraryController() {return mLibraryController;} public slots: void onRefreshCurrentFolder(); @@ -59,6 +59,7 @@ signals: void navigBarUpdate(UBLibElement* pElem); void itemsSelected(QList elemList, bool inTrash); void propertiesRequested(UBLibElement* pElem); + void displaySearchEngine(UBLibElement* pElem); void favoritesEntered(bool bFav); void itemClicked(); diff --git a/src/gui/UBMainWindow.cpp b/src/gui/UBMainWindow.cpp index 11d8b41c..1bc2cab5 100644 --- a/src/gui/UBMainWindow.cpp +++ b/src/gui/UBMainWindow.cpp @@ -16,7 +16,6 @@ #include #include "UBMainWindow.h" - #include "core/UBApplication.h" #include "core/UBApplicationController.h" #include "board/UBBoardController.h" @@ -160,3 +159,26 @@ bool UBMainWindow::yesNoQuestion(QString windowTitle, QString text) return messageBox.clickedButton() == yesButton; } + +void UBMainWindow::oneButtonMessageBox(QString windowTitle, QString text, QMessageBox::Icon type) +{ + QMessageBox messageBox; + messageBox.setParent(this); + messageBox.setWindowFlags(Qt::Dialog); + messageBox.setWindowTitle(windowTitle); + messageBox.setText(text); + messageBox.addButton(tr("Ok"),QMessageBox::YesRole); + messageBox.setIcon(type); + messageBox.exec(); +} + +void UBMainWindow::warning(QString windowTitle, QString text) +{ + oneButtonMessageBox(windowTitle,text, QMessageBox::Warning); +} + +void UBMainWindow::information(QString windowTitle, QString text) +{ + oneButtonMessageBox(windowTitle, text, QMessageBox::Information); +} + diff --git a/src/gui/UBMainWindow.h b/src/gui/UBMainWindow.h index 2bd6fc25..4150bbec 100644 --- a/src/gui/UBMainWindow.h +++ b/src/gui/UBMainWindow.h @@ -20,6 +20,7 @@ #include #include #include +#include class QStackedLayout; @@ -41,7 +42,10 @@ class UBMainWindow : public QMainWindow, public Ui::MainWindow void addDocumentsWidget(QWidget *pWidget); void switchToDocumentsWidget(); + bool yesNoQuestion(QString windowTitle, QString text); + void warning(QString windowTitle, QString text); + void information(QString windowTitle, QString text); signals: void closeEvent_Signal( QCloseEvent *event ); @@ -50,6 +54,7 @@ class UBMainWindow : public QMainWindow, public Ui::MainWindow void onExportDone(); protected: + void oneButtonMessageBox(QString windowTitle, QString text, QMessageBox::Icon type); virtual void keyPressEvent(QKeyEvent *event); virtual void closeEvent (QCloseEvent *event); diff --git a/src/gui/UBUpdateDlg.cpp b/src/gui/UBUpdateDlg.cpp index 2c2ba56b..c0651258 100644 --- a/src/gui/UBUpdateDlg.cpp +++ b/src/gui/UBUpdateDlg.cpp @@ -12,28 +12,29 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include #include #include "UBUpdateDlg.h" +#include "core/UBApplication.h" +#include "UBMainWindow.h" #include "core/memcheck.h" UBUpdateDlg::UBUpdateDlg(QWidget *parent, int nbFiles, const QString& bkpPath) - : QDialog(parent) - , mMainLayout(NULL) - , mNbFilesLabel(NULL) - , mBkpLabel(NULL) - , mBkpPath(NULL) - , mBrowseBttn(NULL) - , mpDlgBttn(NULL) - , mLayout(NULL) - , mHLayout(NULL) - , mStackedWidget(NULL) - , mDialogWidget(NULL) - , mProgressWidget(NULL) - , mProgressLayout(NULL) - , mProgressLabel(NULL) + : QDialog(parent) + , mMainLayout(NULL) + , mNbFilesLabel(NULL) + , mBkpLabel(NULL) + , mBkpPath(NULL) + , mBrowseBttn(NULL) + , mpDlgBttn(NULL) + , mLayout(NULL) + , mHLayout(NULL) + , mStackedWidget(NULL) + , mDialogWidget(NULL) + , mProgressWidget(NULL) + , mProgressLayout(NULL) + , mProgressLabel(NULL) { mDialogWidget = new QWidget(this); @@ -178,18 +179,16 @@ void UBUpdateDlg::onUpdate() void UBUpdateDlg::onFilesUpdated(bool bResult) { - this->hide(); + this->hide(); QString qsMsg; - if (bResult) - { + if (bResult) { qsMsg = tr("Files update successful!\nPlease reboot the application to access the updated documents."); } - else - { + else { qsMsg = tr("An error occured during the update. The files have not been affected."); } - QMessageBox::information(this, tr("Files update results"), qsMsg, QMessageBox::Ok); + UBApplication::mainWindow->information(tr("Files update results"), qsMsg); } QString UBUpdateDlg::backupPath() diff --git a/src/gui/gui.pri b/src/gui/gui.pri index d7ad9d1e..d5f9eb62 100644 --- a/src/gui/gui.pri +++ b/src/gui/gui.pri @@ -43,7 +43,8 @@ HEADERS += src/gui/UBThumbnailView.h \ src/gui/UBLibWidget.h \ src/gui/UBMagnifer.h \ src/gui/UBCachePropertiesWidget.h \ - src/gui/UBTeacherBarWidget.h + src/gui/UBTeacherBarWidget.h \ + src/gui/UBLibWebView.h SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBFloatingPalette.cpp \ @@ -89,7 +90,8 @@ SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBLibWidget.cpp \ src/gui/UBMagnifer.cpp \ src/gui/UBCachePropertiesWidget.cpp \ - src/gui/UBTeacherBarWidget.cpp + src/gui/UBTeacherBarWidget.cpp \ + src/gui/UBLibWebView.cpp win32 { diff --git a/src/network/UBNetworkAccessManager.cpp b/src/network/UBNetworkAccessManager.cpp index 6529c388..c2b7aa10 100644 --- a/src/network/UBNetworkAccessManager.cpp +++ b/src/network/UBNetworkAccessManager.cpp @@ -160,14 +160,18 @@ void UBNetworkAccessManager::sslErrors(QNetworkReply *reply, const QListurl().toString()).arg(errors), - QMessageBox::Yes | QMessageBox::No, - QMessageBox::No); - - if (ret == QMessageBox::Yes) - { + QMessageBox messageBox; + messageBox.setParent(mainWindow); + messageBox.setWindowFlags(Qt::Dialog); + messageBox.setWindowTitle(QCoreApplication::applicationName()); + messageBox.setText(tr("SSL Errors:\n\n%1\n\n%2\n\n" + "Do you want to ignore these errors for this host?").arg(reply->url().toString()).arg(errors)); + QPushButton* yesButton = messageBox.addButton(tr("Yes"),QMessageBox::YesRole); + messageBox.addButton(tr("No"),QMessageBox::NoRole); + messageBox.setIcon(QMessageBox::Question); + messageBox.exec(); + + if(messageBox.clickedButton() == yesButton) { reply->ignoreSslErrors(); sslTrustedHostList.append(replyHost); } diff --git a/src/web/browser/WBWebView.cpp b/src/web/browser/WBWebView.cpp index 23fb6cb5..eb0be66f 100644 --- a/src/web/browser/WBWebView.cpp +++ b/src/web/browser/WBWebView.cpp @@ -168,8 +168,7 @@ void WBWebPage::handleUnsupportedContent(QNetworkReply *reply) messageBox.setText(tr("Download PDF Document: would you prefer to download the PDF file or add it to the current Sankore document?")); messageBox.addButton(tr("Download"), QMessageBox::AcceptRole); - QAbstractButton *addButton = - messageBox.addButton(tr("Add to Current Document"), QMessageBox::AcceptRole); + QAbstractButton *addButton = messageBox.addButton(tr("Add to Current Document"), QMessageBox::AcceptRole); messageBox.exec(); if (messageBox.clickedButton() == addButton)