Commit 36abfc5c authored by shibakaneki's avatar shibakaneki

Merge branch 'master' of github.com:Sankore/Sankore-3.1

parents 104dfcd5 24ad7792
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/webbrowser"
version="1.1"
width="650"
height="400"
ub:resizable="true">
<name>Choisir</name>
<author href="http://www.getuniboard.com"
email="info@mnemis.com">Mnemis SA</author>
<description>Choisir widget</description>
<content src="index.html"/>
</widget>
/*
Document : basic
Created on : Sep 5, 2011, 12:01:33 PM
Author : GEG.BY
Description:
Purpose of the stylesheet follows.
*/
/*
TODO customize this sample style
Syntax recommendation http://www.w3.org/TR/REC-CSS2/
*/
body{
padding: 3px;
margin: 0 auto;
height: auto;
}
.toggleButton{
width: 20px;
height: 28px;
border: none;
background-image: url(../images/greySquare.png);
font-weight: bold;
font-family: Verdana;
color: #00C6FF;;
cursor: pointer;
}
.buttonDiv{
position: absolute;
float: right;
z-index: 1;
}
.addQstDiv{
float: left;
padding: 5px;
margin: 2px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: large;
}
.addQstButton{
margin: 0;
border: none;
background: none;
color: #E6E3DC;
cursor: pointer;
}
#addQsqSpan1{
font-size: 30px;
margin-right: 10px !important;
}
.qstDiv{
width: 90%;
margin: 2px auto;
padding: 5px;
float: left;
font-family: Verdana,Arial,Helvetica,sans-serif;
}
.qstDivDisplay{
width: 90%;
margin: 5px 5%;
padding: 5px;
float: left;
font-family: Verdana,Arial,Helvetica,sans-serif;
border: 2px solid #cccccc;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: #dadada -1px 0 4px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
}
.spanOptConn{
float: left;
width: 100%;
}
.qstNumber{
float: left;
font-size: 30px;
margin-left: 10px !important;
color: #00C6FF;
}
.qstOptions{
float: right;
}
.changeOptions{
border: none;
background-image: url(../images/grayClose.png);
background-color: white;
background-repeat: no-repeat;
background-position: 0 50%;
width: auto;
padding-left: 18px;
color: #E6E3DC;
cursor: pointer;
}
.applyChanges{
border: none;
background-image: url(../images/blueClose.png);
background-color: white;
background-repeat: no-repeat;
background-position: 0 50%;
width: auto;
padding-left: 18px;
color: #E6E3DC;
cursor: pointer;
}
.qstDelete{
border: none;
background-image: url(../images/boldClose.png);
background-color: white;
background-repeat: no-repeat;
background-position: 0 50%;
width: auto;
padding-left: 28px;
line-height: 35px;
cursor: pointer;
}
.qstContent{
float: left;
padding: 3px;
margin-left: 10px;
margin-bottom: 10px;
width: 100%;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
border: 3px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: #dadada -1px 0 4px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
}
.qstContentDisplay{
float: left;
padding: 5px;
margin: 10px;
width: 100%;
font-family: Verdana,Arial,Helvetica,sans-serif;
color:#333333;
}
.ansDiv{
float: left;
margin-left: 100px;
width: 80%;
}
.ansAdd{
border: none;
background: url(../images/blueClose.png) -0px -0px no-repeat;
background-color: white;
width: auto;
padding-left: 20px;
line-height: 24px;
color: #E6E3DC;
cursor: pointer;
}
.newAnswer{
float: left;
width: 100%;
margin: 3px;
}
.ansSpan{
border: none;
background: url(../images/point.png) -0px -0px no-repeat;
background-color: white;
background-position: 0 50%;
color: #00C6FF;
font-size: 14px;
float: left;
padding-left: 35px;
width: 20px;
}
.ansSpanDisplay{
color: #00C6FF;
font-size: 14px;
float: left;
}
.ansContent{
padding: 1px 3px 3px 3px;
margin-left: 5px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
width: 80%;
float: left;
border: 3px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: #dadada -1px 0 4px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
}
.ansContentDisplay{
padding: 1px 3px 3px 3px;
margin-left: 5px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
width: 80%;
float: left;
}
.ansDelete{
float: right;
border: none;
background-image: url(../images/boldGreyClose.png);
background-color: white;
background-repeat: no-repeat;
background-position: 0 50%;
cursor: pointer;
}
.qstOptChoice{
width: 80%;
margin: 10px 10%;
float: left;
background-color: #F3F3F2;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #ECECEB;
border-right-color: #ECECEB;
border-bottom-color: #ECECEB;
border-left-color: #ECECEB;
border-top-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
border-bottom-left-radius: 5px 5px;
-webkit-box-shadow: #dededd 0 0 2px inset;
padding: 0;
}
.optDescImg{
padding: 2px;
margin: 5px;
background: url(../images/tool.png) -0px -0px no-repeat;
float: left;
margin-left: 20px;
width: 56px;
height: 51px;
}
.optDescText{
text-align: center;
width: 70%;
color: #CCC;
float: left;
font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif;
margin: 3px 5px;
padding: 5px;
}
.type{
float: left;
margin: 10px;
padding: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: #dadada -1px 0 4px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
}
.contentType{
width: 100%;
padding: 0;
margin: 0;
background-color: white;
border-bottom: 1px solid #DFDFDE;
border-top-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
}
.divType1, .divType2, .divType3 {
width: 122px;
height: 97px;
padding: 0 15px;
margin-left: 30px;
}
.divType1{
background: url(../images/1thOption.png)-0px -0px no-repeat;
}
.divType2{
background: url(../images/2thOption.png)-0px -0px no-repeat;
}
.divType3{
background: url(../images/3thOption.png)-0px -0px no-repeat;
}
.textType{
width: 160px;
font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif;
color: #AAA;
padding: 3px;
margin-left: 20px;
}
.radioDiv{
background-color: #F5F5F5;
border-top: 1px solid white;
width: 100%;
padding: 0;
margin: 0;
height: 30px;
border-bottom-right-radius: 5px 5px;
border-bottom-left-radius: 5px 5px;
}
.radioType{
float: right;
margin: 2px;
padding: 3px;
}
\ No newline at end of file
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/basic.css"/>
<script type="text/javascript" src="scripts/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="scripts/selQuestionApp.js"></script>
<script type="text/javascript">
$(document).ready(function(){
init();
});
</script>
</head>
<body>
</body>
</html>
copy.src.files=false
copy.src.target=
index.file=index.html
run.as=LOCAL
url=http://localhost/Choisir.wgt/
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
</project-private>
include.path=${php.global.include.path}
php.version=PHP_5
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=true
web.root=.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>Choisir.wgt</name>
</data>
</configuration>
</project>
......@@ -85,15 +85,12 @@ WBHistoryManager *WBBrowserWindow::sHistoryManager = 0;
WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWindow, bool isViewerWebInstance)
: QWidget(parent)
, mWebToolBar(0)
, mSearchToolBar(0)
, mTabWidget(new WBTabWidget(this))
, mSearchAction(0)
, mUniboardMainWindow(uniboardMainWindow)
, mWebToolBar(0)
{
qDebug() << "Height: " << this->height();
qDebug() << "width: " << this->width();
QWebSettings *defaultSettings = QWebSettings::globalSettings();
defaultSettings->setAttribute(QWebSettings::JavascriptEnabled, true);
defaultSettings->setAttribute(QWebSettings::PluginsEnabled, true);
......@@ -110,8 +107,7 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi
this->setLayout(layout);
connect(mTabWidget, SIGNAL(loadPage(const QString &)),
this, SLOT(loadPage(const QString &)));
connect(mTabWidget, SIGNAL(loadPage(const QString &)), this, SLOT(loadPage(const QString &)));
connect(mTabWidget, SIGNAL(setCurrentTitle(const QString &)), this, SLOT(slotUpdateWindowTitle(const QString &)));
......@@ -122,12 +118,7 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi
connect(mTabWidget, SIGNAL(loadFinished(bool)), this, SIGNAL(activeViewPageChanged()));
connect(mTabWidget, SIGNAL(lastTabClosed()),
mTabWidget, SLOT(newTab()));
connect(mTabWidget, SIGNAL(geometryChangeRequested(const QRect &)),
this, SLOT(geometryChangeRequested(const QRect &)));
connect(mTabWidget, SIGNAL(geometryChangeRequested(const QRect &)), this, SLOT(geometryChangeRequested(const QRect &)));
slotUpdateWindowTitle();
......@@ -141,7 +132,15 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi
WBBrowserWindow::~WBBrowserWindow()
{
// NOOP
if(mTabWidget){
delete mTabWidget;
mTabWidget = NULL;
}
if(mSearchToolBar){
delete mSearchToolBar;
mSearchToolBar = NULL;
}
}
......
......@@ -87,8 +87,7 @@ WBTabBar::WBTabBar(QWidget *parent)
connect(shortCut, SIGNAL(activated()), this, SLOT(selectTabAction()));
}
setTabsClosable(true);
connect(this, SIGNAL(tabCloseRequested(int)),
this, SIGNAL(closeTab(int)));
connect(this, SIGNAL(tabCloseRequested(int)), this, SIGNAL(closeTab(int)));
setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
setMovable(true);
setDocumentMode(false);
......@@ -116,26 +115,23 @@ void WBTabBar::contextMenuRequested(const QPoint &position)
menu.addAction(tr("New &Tab"), this, SIGNAL(newTab()), QKeySequence::AddTab);
int index = tabAt(position);
if (-1 != index) {
QAction *action = menu.addAction(tr("Clone Tab"),
this, SLOT(cloneTab()));
QAction *action = menu.addAction(tr("Clone Tab"), this, SLOT(cloneTab()));
action->setData(index);
menu.addSeparator();
action = menu.addAction(tr("&Close Tab"),
this, SLOT(closeTab()), QKeySequence::Close);
action = menu.addAction(tr("&Close Tab"), this, SLOT(closeTab()), QKeySequence::Close);
action->setData(index);
action = menu.addAction(tr("Close &Other Tabs"),
this, SLOT(closeOtherTabs()));
action = menu.addAction(tr("Close &Other Tabs"), this, SLOT(closeOtherTabs()));
action->setData(index);
menu.addSeparator();
action = menu.addAction(tr("Reload Tab"),
this, SLOT(reloadTab()), QKeySequence::Refresh);
action = menu.addAction(tr("Reload Tab"), this, SLOT(reloadTab()), QKeySequence::Refresh);
action->setData(index);
} else {
}
else {
menu.addSeparator();
}
menu.addAction(tr("Reload All Tabs"), this, SIGNAL(reloadAllTabs()));
......@@ -412,45 +408,30 @@ WBWebView *WBTabWidget::newTab(bool makeCurrent)
p.setColor(QPalette::Window, palette().color(QPalette::Base));
emptyWidget->setPalette(p);
emptyWidget->setAutoFillBackground(true);
disconnect(this, SIGNAL(currentChanged(int)),
this, SLOT(currentChanged(int)));
disconnect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
addTab(emptyWidget, tr("(Untitled)"));
connect(this, SIGNAL(currentChanged(int)),
this, SLOT(currentChanged(int)));
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
return 0;
}
// webview
WBWebView *webView = new WBWebView;
urlLineEdit->setWebView(webView);
connect(webView, SIGNAL(loadStarted()),
this, SLOT(webViewLoadStarted()));
connect(webView, SIGNAL(loadFinished(bool)),
this, SLOT(webViewIconChanged()));
connect(webView, SIGNAL(iconChanged()),
this, SLOT(webViewIconChanged()));
connect(webView, SIGNAL(titleChanged(const QString &)),
this, SLOT(webViewTitleChanged(const QString &)));
connect(webView, SIGNAL(urlChanged(const QUrl &)),
this, SLOT(webViewUrlChanged(const QUrl &)));
connect(webView->page(), SIGNAL(windowCloseRequested()),
this, SLOT(windowCloseRequested()));
connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)),
this, SIGNAL(geometryChangeRequested(const QRect &)));
connect(webView->page(), SIGNAL(printRequested(QWebFrame *)),
this, SIGNAL(printRequested(QWebFrame *)));
connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)),
this, SIGNAL(statusBarVisibilityChangeRequested(bool)));
connect(webView->page(), SIGNAL(toolBarVisibilityChangeRequested(bool)),
this, SIGNAL(toolBarVisibilityChangeRequested(bool)));
connect(webView, SIGNAL(pixmapCaptured(const QPixmap&, bool)),
UBApplication::applicationController, SLOT(addCapturedPixmap(const QPixmap &, bool)));
connect(webView, SIGNAL(embedCodeCaptured(const QString&)),
UBApplication::applicationController, SLOT(addCapturedEmbedCode(const QString&)));
connect(webView, SIGNAL(loadStarted()), this, SLOT(webViewLoadStarted()));
connect(webView, SIGNAL(loadFinished(bool)), this, SLOT(webViewIconChanged()));
connect(webView, SIGNAL(iconChanged()), this, SLOT(webViewIconChanged()));
connect(webView, SIGNAL(titleChanged(const QString &)), this, SLOT(webViewTitleChanged(const QString &)));
connect(webView, SIGNAL(urlChanged(const QUrl &)), this, SLOT(webViewUrlChanged(const QUrl &)));
connect(webView->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)), this, SIGNAL(geometryChangeRequested(const QRect &)));
connect(webView->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *)));
connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)), this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)), this, SIGNAL(statusBarVisibilityChangeRequested(bool)));
connect(webView->page(), SIGNAL(toolBarVisibilityChangeRequested(bool)), this, SIGNAL(toolBarVisibilityChangeRequested(bool)));
connect(webView, SIGNAL(pixmapCaptured(const QPixmap&, bool)), UBApplication::applicationController, SLOT(addCapturedPixmap(const QPixmap &, bool)));
connect(webView, SIGNAL(embedCodeCaptured(const QString&)), UBApplication::applicationController, SLOT(addCapturedEmbedCode(const QString&)));
addTab(webView, tr("(Untitled)"));
if (makeCurrent)
......@@ -465,7 +446,6 @@ WBWebView *WBTabWidget::newTab(bool makeCurrent)
if (count() == 1)
currentChanged(currentIndex());
emit tabsChanged();
return webView;
}
......@@ -553,13 +533,13 @@ void WBTabWidget::closeTab(int index)
removeTab(index);
webView->deleteLater();
emit tabsChanged();
if (hasFocus && count() > 0)
currentWebView()->setFocus();
if (count() == 0)
emit lastTabClosed();
if (count() == 0){
newTab();
emit currentChanged(0);
}
}
void WBTabWidget::webViewLoadStarted()
......@@ -616,7 +596,6 @@ void WBTabWidget::webViewUrlChanged(const QUrl &url)
{
mTabBar->setTabData(index, url);
}
emit tabsChanged();
// web view does not reload sometime on OSX ... force it
webView->show();
......
......@@ -143,8 +143,6 @@ class WBTabWidget : public QTabWidget
signals:
// tab widget signals
void loadPage(const QString &url);
void tabsChanged();
void lastTabClosed();
// current tab signals
void setCurrentTitle(const QString &url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment