mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +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(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(urlED, SIGNAL(textChanged(const QString &)),
|
||||
connect(targetED, SIGNAL(textChanged(const QString &)),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(nameED, SIGNAL(textChanged(const QString &)),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(WebRB, SIGNAL(clicked()),
|
||||
connect(webRB, SIGNAL(clicked()),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(EmailRB, SIGNAL(clicked()),
|
||||
connect(emailRB, SIGNAL(clicked()),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(FileRB, SIGNAL(clicked()),
|
||||
connect(fileRB, SIGNAL(clicked()),
|
||||
this, SLOT(changed_adaptor()));
|
||||
|
||||
setFocusProxy(urlED);
|
||||
setFocusProxy(targetED);
|
||||
|
||||
bc().setOK(okPB);
|
||||
bc().setCancel(closePB);
|
||||
bc().addReadOnly(urlED);
|
||||
bc().addReadOnly(targetED);
|
||||
bc().addReadOnly(nameED);
|
||||
bc().addReadOnly(WebRB);
|
||||
bc().addReadOnly(EmailRB);
|
||||
bc().addReadOnly(FileRB);
|
||||
bc().addReadOnly(webRB);
|
||||
bc().addReadOnly(emailRB);
|
||||
bc().addReadOnly(fileRB);
|
||||
}
|
||||
|
||||
|
||||
@ -72,27 +72,27 @@ void GuiHyperlink::closeEvent(QCloseEvent * e)
|
||||
|
||||
void GuiHyperlink::updateContents()
|
||||
{
|
||||
urlED->setText(toqstr(params_["target"]));
|
||||
targetED->setText(toqstr(params_["target"]));
|
||||
nameED->setText(toqstr(params_["name"]));
|
||||
if (params_["type"] == "")
|
||||
WebRB->setChecked(true);
|
||||
webRB->setChecked(true);
|
||||
else if (params_["type"] == "mailto:")
|
||||
EmailRB->setChecked(true);
|
||||
emailRB->setChecked(true);
|
||||
else if (params_["type"] == "file:")
|
||||
FileRB->setChecked(true);
|
||||
fileRB->setChecked(true);
|
||||
bc().setValid(isValid());
|
||||
}
|
||||
|
||||
|
||||
void GuiHyperlink::applyView()
|
||||
{
|
||||
params_["target"] = qstring_to_ucs4(urlED->text());
|
||||
params_["target"] = qstring_to_ucs4(targetED->text());
|
||||
params_["name"] = qstring_to_ucs4(nameED->text());
|
||||
if (WebRB->isChecked())
|
||||
if (webRB->isChecked())
|
||||
params_["type"] = qstring_to_ucs4("");
|
||||
else if (EmailRB->isChecked())
|
||||
else if (emailRB->isChecked())
|
||||
params_["type"] = qstring_to_ucs4("mailto:");
|
||||
else if (FileRB->isChecked())
|
||||
else if (fileRB->isChecked())
|
||||
params_["type"] = qstring_to_ucs4("file:");
|
||||
params_.setCmdName("href");
|
||||
}
|
||||
@ -100,7 +100,7 @@ void GuiHyperlink::applyView()
|
||||
|
||||
bool GuiHyperlink::isValid()
|
||||
{
|
||||
QString const u = urlED->text();
|
||||
QString const u = targetED->text();
|
||||
QString const n = nameED->text();
|
||||
|
||||
return !u.isEmpty() || !n.isEmpty();
|
||||
|
@ -17,7 +17,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="urlLA" >
|
||||
<widget class="QLabel" name="targetLA" >
|
||||
<property name="toolTip" >
|
||||
<string>URL</string>
|
||||
</property>
|
||||
@ -25,12 +25,12 @@
|
||||
<string>&Target:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>urlED</cstring>
|
||||
<cstring>targetED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="urlED" >
|
||||
<widget class="QLineEdit" name="targetED" >
|
||||
<property name="toolTip" >
|
||||
<string>URL</string>
|
||||
</property>
|
||||
@ -57,11 +57,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QGroupBox" name="TypeGB" >
|
||||
<widget class="QGroupBox" name="typeGB" >
|
||||
<property name="toolTip" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<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 name="title" >
|
||||
@ -69,11 +69,11 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="WebRB" >
|
||||
<widget class="QRadioButton" name="webRB" >
|
||||
<property name="toolTip" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<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 name="text" >
|
||||
@ -82,11 +82,11 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QRadioButton" name="EmailRB" >
|
||||
<widget class="QRadioButton" name="emailRB" >
|
||||
<property name="toolTip" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<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 name="text" >
|
||||
@ -95,11 +95,11 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QRadioButton" name="FileRB" >
|
||||
<widget class="QRadioButton" name="fileRB" >
|
||||
<property name="toolTip" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
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;">
|
||||
<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 name="text" >
|
||||
@ -178,11 +178,11 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>urlED</tabstop>
|
||||
<tabstop>targetED</tabstop>
|
||||
<tabstop>nameED</tabstop>
|
||||
<tabstop>WebRB</tabstop>
|
||||
<tabstop>EmailRB</tabstop>
|
||||
<tabstop>FileRB</tabstop>
|
||||
<tabstop>webRB</tabstop>
|
||||
<tabstop>emailRB</tabstop>
|
||||
<tabstop>fileRB</tabstop>
|
||||
<tabstop>okPB</tabstop>
|
||||
<tabstop>closePB</tabstop>
|
||||
</tabstops>
|
||||
|
Loading…
Reference in New Issue
Block a user