-th.info {
- background-color : #99FF99;
+div.tab {
+
+ border-style : solid;
+ border-width : thin;
+ width : 100%
}
-th.key {
+div.info {
+ font-weight : bold;
+ text-align : center;
+ border-style : solid;
+ border-width : thin;
+ margin : 2px 2px 2px 2px;
+ background-color : #99FF99;
+}
+
+div.key {
+ font-weight : bold;
+ text-align : center;
+ border-style : solid;
+ border-width : thin;
+ margin : 2px 2px 2px 2px;
background-color : #99CCFF;
}
+div.cell {
+ border-style : solid;
+ border-width : thin;
+ margin : 2px 2px 2px 2px;
+}
+
span.i {
font-style : italic;
}
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
- <table border="1" width="100%">
- <xsl:for-each select="ar/dict">
+ <div class="tab">
+ <xsl:for-each select="ar/dict">
<xsl:apply-templates/>
- </xsl:for-each>
- </table>
+ </xsl:for-each>
+ </div>
</xsl:template>
<xsl:template match="info">
- <tr>
- <th class="info">
+ <div class="info">
<xsl:if test="@bookmark = 'true'">
<img src="$STAR$" width="16" height="16"/>
</xsl:if>
- <xsl:value-of select="."/> <!-- <img src="{$path}"/> -->
- </th>
- </tr>
+ <xsl:value-of select="."/>
+ </div>
</xsl:template>
<xsl:template match="key">
- <tr>
- <th class="key"><xsl:value-of select="."/></th>
- </tr>
+ <div class="key"><xsl:value-of select="."/></div>
</xsl:template>
<xsl:template match="t">
- <tr>
- <td><xsl:apply-templates/></td>
- </tr>
+ <div class="cell"><xsl:apply-templates/></div>
</xsl:template>
<xsl:template match="tr">
<br/>
</xsl:template>
-<!--
-<xsl:template match="table">
- <table>
- <xsl:apply-templates/>
- </table>
-</xsl:template>
-
-<xsl:template match="tr">
- <tr>
- <xsl:apply-templates/>
- </tr>
-</xsl:template>
-
-<xsl:template match="td">
- <td>
- <xsl:apply-templates/>
- </td>
-</xsl:template> -->
-
</xsl:stylesheet>
CommonDictInterface* selectedPlugin =
DictTypeSelectDialog::addNewDict(guiInterface->getPlugins(),this);
- if(selectedPlugin != NULL) {
+ if(selectedPlugin) {
Settings* settings =
selectedPlugin->dictDialog()->addNewDictionary(this);
- if(settings != NULL) {
+ if(settings) {
CommonDictInterface* newDict = selectedPlugin->getNew(settings);
if(newDict) {
delete settings;
pluginsListWidget->addItem(item);
}
- _selectedPlugin = NULL;
+ _selectedPlugin = 0;
connect(pluginsListWidget, SIGNAL(itemClicked(QListWidgetItem*)),
this, SLOT(pluginSelected(QListWidgetItem*)));
return dictSelect.selectedPlugin();
}
else {
- return NULL;
+ return 0;
}
}
/*!
\param plugins list of loaded plugins
\param parent widget
- \return selected plugin, if user cancels dialog it returns NULL
+ \return selected plugin, if user cancels dialog it returns 0 (NULL)
*/
static CommonDictInterface* addNewDict(
QList<CommonDictInterface* > plugins,
void MenuTabWidget::hideEvent(QHideEvent *e) {
- //just sets parent to null, and allows event to be handled by default handler
- setParent(NULL);
+ //just sets parent to 0 (null), and allows event to be handled by default handler
+ setParent(0);
QTabWidget::hideEvent(e);
protected:
/*!
Reimplemented default hideEvent function.
- Right before hiding widget it sets its parent to NULL, which prevents
+ Right before hiding widget it sets its parent to 0 (NULL), which prevents
widget from being deleted by menu bar.
*/
void hideEvent(QHideEvent *);
QWidget* MenuWidget::createWidget(QWidget *) {
/*When we have request to create new widget we return tabWidget.
When the menu is closing, tabWidget will receive hideEvent which will set
- its parent to NULL and prevent it from delete, so we can still use this
+ its parent to 0 (NULL) and prevent it from delete, so we can still use this
widget*/
return tabWidget;
tr("Select dictionary file"),
"",
tr("XDXF Files (*.xdxf)"),
- NULL,
- NULL);
+ 0,
+ 0);
if (!fileName.isEmpty()) {
browseLabel->setText(tr("Dictionary file: %1").arg(fileName));
return settings;
}
- return NULL;
+ return 0;
}
explicit XdxfLoadDialog(QWidget *parent = 0);
/*! Displays dialog and returns settings of new dictionary
- \return Settings object containing new dictionary settings or NULL in
+ \return Settings object containing new dictionary settings or 0 (NULL) in
case user cancels dialog
*/
static Settings* getSettings(QWidget *parent);
tr("Select dictionary file"),
"",
tr("XDXF Files (*.xdxf)"),
- NULL,
- NULL);
+ 0,
+ 0);
if (!fileName.isEmpty()) {
browseLabel->setText(tr("Dictionary file: ") + fileName);
_dicitonaryFilePath = fileName;