32 #include <QVBoxLayout>
33 #include <QHBoxLayout>
34 #include <QApplication>
48 QVBoxLayout *vbox_layout =
new QVBoxLayout ();
49 vbox_layout->setMargin (0);
50 setLayout (vbox_layout);
52 QHBoxLayout *hbox_layout =
new QHBoxLayout ();
53 hbox_layout->setMargin (0);
54 hbox_layout->setSpacing (0);
55 vbox_layout->addLayout (hbox_layout);
58 _tab_bar->setSizePolicy (QSizePolicy::Preferred,QSizePolicy::Preferred);
61 #ifdef HAVE_QTABWIDGET_SETMOVABLE
77 hbox_layout =
new QHBoxLayout ();
78 vbox_layout->addLayout (hbox_layout);
81 #ifdef HAVE_SETPLACEHOLDERTEXT
83 tr (
"Type here and press \'Return\' to search"));
90 connect (
_tab_bar, SIGNAL (tabCloseRequested (
int)),
this,
92 connect (
_tab_bar, SIGNAL (currentChanged (
int)),
this,
105 QTextBrowser *msg =
addNewTab (tr (
"Error"));
106 QString msg_text = QString (
107 "<html><body><br><br><center><b>%1</b></center></body></html>").
108 arg (tr (
"The info file<p>%1<p>or compressed versions do not exist").
110 msg->setHtml (msg_text);
130 QString tab_text = node_name;
131 tab_text.replace(
"XREF",
"");
134 for (
int i = 0; i <
_tab_bar->count (); i++)
136 if (tab_text ==
_tab_bar->tabText (i))
157 QString node = link.toString ();
158 if (node.at (0) !=
'#')
167 QVariant tab_data =
_tab_bar->tabData (index);
168 _text_browser =
static_cast<QTextBrowser*
> (tab_data.value<
void*> ());
185 connect (
_text_browser, SIGNAL (anchorClicked (
const QUrl &)),
this,
187 disconnect(
_tab_bar, SIGNAL (currentChanged(
int)),
this,
197 _tab_bar->setTabData (nt, tab_data);
199 connect (
_tab_bar, SIGNAL (currentChanged (
int)),
this,
214 QVariant tab_data =
_tab_bar->tabData (index);
227 if (text.length () > 0)
277 QClipboard *clipboard = QApplication::clipboard ();
306 QClipboard *clipboard = QApplication::clipboard ();
307 QString str = clipboard->text ();
308 if (str.length () > 0)
void load_ref(const QString &ref_name)
QCheckBox * _search_check_box
QString global_search(const QString &text, int maxFounds)
QTextBrowser * addNewTab(const QString &name)
QString fromStdString(const std::string &s)
bool set_info_path(const QString &info_path)
void link_clicked(const QUrl &link)
QTextBrowser * _text_browser
QStackedWidget * _stacked_widget
static octave_idx_type link(octave_idx_type s, octave_idx_type t, octave_idx_type *pp)
QToolButton * _zoom_out_button
std::complex< double > w(std::complex< double > z, double relerr=0)
QLineEdit * _search_line_edit
QString node_text_to_html(const QString &text, int anchorPos=-1, const QString &anchor=QString())
Translates text of node to Html.
void load_node(const QString &node_name)
void current_tab_changed(int index)
int is_ref(const QString &node)
Checks if this node is reference.
void close_tab(int index)
bool set_info_path(const QString &_info_path)
static QIcon icon(const QString &icon_name, bool fallback=true)
QString find_ref(const QString &name)
QString search_node(const QString &node)
webinfo(QWidget *parent=0)
QToolButton * _zoom_in_button