mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 00:50:42 +08:00
Add proper text for alternate diretory window.
This commit is contained in:
@@ -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
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user