mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
GuiHyperlink.cpp /HyperlinkUi.ui: follow the LyX naming conventions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21350 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0a7567ce3b
commit
2749683873
@ -34,26 +34,26 @@ GuiHyperlink::GuiHyperlink(LyXView & lv)
|
|||||||
|
|
||||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||||
connect(urlED, SIGNAL(textChanged(const QString &)),
|
connect(targetED, SIGNAL(textChanged(const QString &)),
|
||||||
this, SLOT(changed_adaptor()));
|
this, SLOT(changed_adaptor()));
|
||||||
connect(nameED, SIGNAL(textChanged(const QString &)),
|
connect(nameED, SIGNAL(textChanged(const QString &)),
|
||||||
this, SLOT(changed_adaptor()));
|
this, SLOT(changed_adaptor()));
|
||||||
connect(WebRB, SIGNAL(clicked()),
|
connect(webRB, SIGNAL(clicked()),
|
||||||
this, SLOT(changed_adaptor()));
|
this, SLOT(changed_adaptor()));
|
||||||
connect(EmailRB, SIGNAL(clicked()),
|
connect(emailRB, SIGNAL(clicked()),
|
||||||
this, SLOT(changed_adaptor()));
|
this, SLOT(changed_adaptor()));
|
||||||
connect(FileRB, SIGNAL(clicked()),
|
connect(fileRB, SIGNAL(clicked()),
|
||||||
this, SLOT(changed_adaptor()));
|
this, SLOT(changed_adaptor()));
|
||||||
|
|
||||||
setFocusProxy(urlED);
|
setFocusProxy(targetED);
|
||||||
|
|
||||||
bc().setOK(okPB);
|
bc().setOK(okPB);
|
||||||
bc().setCancel(closePB);
|
bc().setCancel(closePB);
|
||||||
bc().addReadOnly(urlED);
|
bc().addReadOnly(targetED);
|
||||||
bc().addReadOnly(nameED);
|
bc().addReadOnly(nameED);
|
||||||
bc().addReadOnly(WebRB);
|
bc().addReadOnly(webRB);
|
||||||
bc().addReadOnly(EmailRB);
|
bc().addReadOnly(emailRB);
|
||||||
bc().addReadOnly(FileRB);
|
bc().addReadOnly(fileRB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -72,27 +72,27 @@ void GuiHyperlink::closeEvent(QCloseEvent * e)
|
|||||||
|
|
||||||
void GuiHyperlink::updateContents()
|
void GuiHyperlink::updateContents()
|
||||||
{
|
{
|
||||||
urlED->setText(toqstr(params_["target"]));
|
targetED->setText(toqstr(params_["target"]));
|
||||||
nameED->setText(toqstr(params_["name"]));
|
nameED->setText(toqstr(params_["name"]));
|
||||||
if (params_["type"] == "")
|
if (params_["type"] == "")
|
||||||
WebRB->setChecked(true);
|
webRB->setChecked(true);
|
||||||
else if (params_["type"] == "mailto:")
|
else if (params_["type"] == "mailto:")
|
||||||
EmailRB->setChecked(true);
|
emailRB->setChecked(true);
|
||||||
else if (params_["type"] == "file:")
|
else if (params_["type"] == "file:")
|
||||||
FileRB->setChecked(true);
|
fileRB->setChecked(true);
|
||||||
bc().setValid(isValid());
|
bc().setValid(isValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiHyperlink::applyView()
|
void GuiHyperlink::applyView()
|
||||||
{
|
{
|
||||||
params_["target"] = qstring_to_ucs4(urlED->text());
|
params_["target"] = qstring_to_ucs4(targetED->text());
|
||||||
params_["name"] = qstring_to_ucs4(nameED->text());
|
params_["name"] = qstring_to_ucs4(nameED->text());
|
||||||
if (WebRB->isChecked())
|
if (webRB->isChecked())
|
||||||
params_["type"] = qstring_to_ucs4("");
|
params_["type"] = qstring_to_ucs4("");
|
||||||
else if (EmailRB->isChecked())
|
else if (emailRB->isChecked())
|
||||||
params_["type"] = qstring_to_ucs4("mailto:");
|
params_["type"] = qstring_to_ucs4("mailto:");
|
||||||
else if (FileRB->isChecked())
|
else if (fileRB->isChecked())
|
||||||
params_["type"] = qstring_to_ucs4("file:");
|
params_["type"] = qstring_to_ucs4("file:");
|
||||||
params_.setCmdName("href");
|
params_.setCmdName("href");
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ void GuiHyperlink::applyView()
|
|||||||
|
|
||||||
bool GuiHyperlink::isValid()
|
bool GuiHyperlink::isValid()
|
||||||
{
|
{
|
||||||
QString const u = urlED->text();
|
QString const u = targetED->text();
|
||||||
QString const n = nameED->text();
|
QString const n = nameED->text();
|
||||||
|
|
||||||
return !u.isEmpty() || !n.isEmpty();
|
return !u.isEmpty() || !n.isEmpty();
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QLabel" name="urlLA" >
|
<widget class="QLabel" name="targetLA" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>URL</string>
|
<string>URL</string>
|
||||||
</property>
|
</property>
|
||||||
@ -25,12 +25,12 @@
|
|||||||
<string>&Target:</string>
|
<string>&Target:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy" >
|
||||||
<cstring>urlED</cstring>
|
<cstring>targetED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" colspan="2" >
|
<item row="0" column="1" colspan="2" >
|
||||||
<widget class="QLineEdit" name="urlED" >
|
<widget class="QLineEdit" name="targetED" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>URL</string>
|
<string>URL</string>
|
||||||
</property>
|
</property>
|
||||||
@ -57,11 +57,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="2" column="1" >
|
||||||
<widget class="QGroupBox" name="TypeGB" >
|
<widget class="QGroupBox" name="typeGB" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">specify the link target</p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">specify the link target</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
@ -69,11 +69,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QRadioButton" name="WebRB" >
|
<widget class="QRadioButton" name="webRB" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;">Link to the web or to every other target</p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;">Link to the web or to every other target</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
@ -82,11 +82,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QRadioButton" name="EmailRB" >
|
<widget class="QRadioButton" name="emailRB" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;">Link to an email address</p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;">Link to an email address</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
@ -95,11 +95,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" >
|
<item row="0" column="2" >
|
||||||
<widget class="QRadioButton" name="FileRB" >
|
<widget class="QRadioButton" name="fileRB" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Link to a file</p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Link to a file</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
@ -178,11 +178,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>urlED</tabstop>
|
<tabstop>targetED</tabstop>
|
||||||
<tabstop>nameED</tabstop>
|
<tabstop>nameED</tabstop>
|
||||||
<tabstop>WebRB</tabstop>
|
<tabstop>webRB</tabstop>
|
||||||
<tabstop>EmailRB</tabstop>
|
<tabstop>emailRB</tabstop>
|
||||||
<tabstop>FileRB</tabstop>
|
<tabstop>fileRB</tabstop>
|
||||||
<tabstop>okPB</tabstop>
|
<tabstop>okPB</tabstop>
|
||||||
<tabstop>closePB</tabstop>
|
<tabstop>closePB</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
Loading…
Reference in New Issue
Block a user