Add proper text for alternate diretory window.

This commit is contained in:
Ernie Pasveer
2022-01-22 11:34:42 -06:00
parent 46df5c8a55
commit e5fe2e9d54
3 changed files with 19 additions and 17 deletions
+5 -3
View File
@@ -39,6 +39,7 @@ SeerEditorWidget::SeerEditorWidget(QWidget *parent) : QWidget(parent) {
QObject::connect(alternateCloseToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleAlternateCloseToolButton);
QObject::connect(alternateFileOpenToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleAlternateFileOpenToolButton);
QObject::connect(alternateAcceptToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleAlternateAcceptToolButton);
QObject::connect(alternateLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleAlternateAcceptToolButton);
QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showSearchBar, this, &SeerEditorWidget::showSearchBar);
QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showAlternateBar, this, &SeerEditorWidget::showAlternateBar);
}
@@ -140,6 +141,9 @@ bool SeerEditorWidget::isSearchBarShown () const {
void SeerEditorWidget::showAlternateBar (bool flag) {
// Set the label's text.
alternateLabel->setText("Enter directory path for '" + sourceArea()->file() + "'");
// Go through the widgets in the search bar and hide/show them.
for (int i = 0; i != alternateBarLayout->count(); ++i) {
QWidget* w = alternateBarLayout->itemAt(i)->widget();
@@ -205,8 +209,6 @@ void SeerEditorWidget::handleAlternateAcceptToolButton () {
//qDebug() << "alternate dirname=" << dirname;
if (dirname != "") {
sourceArea()->open(sourceArea()->fullname(), sourceArea()->file(), dirname);
}
sourceArea()->open(sourceArea()->fullname(), sourceArea()->file(), dirname);
}
+13 -13
View File
@@ -214,21 +214,21 @@ class SeerEditorWidget : public QWidget, protected Ui::SeerEditorWidgetForm {
explicit SeerEditorWidget (QWidget* parent = 0);
~SeerEditorWidget ();
SeerEditorWidgetSourceArea* sourceArea ();
SeerEditorWidgetSourceArea* sourceArea ();
void handleSearchLineNumberLineEdit ();
void handleSearchTextLineEdit ();
void handleSearchDownToolButton ();
void handleSearchUpToolButton ();
void handleSearchCloseToolButton ();
void handleAlternateCloseToolButton ();
void handleAlternateFileOpenToolButton ();
void handleAlternateAcceptToolButton ();
void handleSearchLineNumberLineEdit ();
void handleSearchTextLineEdit ();
void handleSearchDownToolButton ();
void handleSearchUpToolButton ();
void handleSearchCloseToolButton ();
void handleAlternateCloseToolButton ();
void handleAlternateFileOpenToolButton ();
void handleAlternateAcceptToolButton ();
public slots:
void showSearchBar (bool flag);
bool isSearchBarShown () const;
void showAlternateBar (bool flag);
bool isAlternateBarShown () const;
void showSearchBar (bool flag);
bool isSearchBarShown () const;
void showAlternateBar (bool flag);
bool isAlternateBarShown () const;
};
+1 -1
View File
@@ -33,7 +33,7 @@
<item row="0" column="0" colspan="5">
<widget class="QLabel" name="alternateLabel">
<property name="text">
<string>TextLabel</string>
<string/>
</property>
</widget>
</item>