diff --git a/src/SeerEditorWidgetAssembly.ui b/src/SeerEditorWidgetAssembly.ui index 10ac7c3..597d8f7 100644 --- a/src/SeerEditorWidgetAssembly.ui +++ b/src/SeerEditorWidgetAssembly.ui @@ -27,6 +27,18 @@ + + 0 + + + 0 + + + 0 + + + 0 + diff --git a/src/SeerEditorWidgetSource.cpp b/src/SeerEditorWidgetSource.cpp index 3061ab4..4aa0141 100644 --- a/src/SeerEditorWidgetSource.cpp +++ b/src/SeerEditorWidgetSource.cpp @@ -61,24 +61,13 @@ SeerEditorWidgetSource::~SeerEditorWidgetSource () { } SeerEditorWidgetSourceArea* SeerEditorWidgetSource::sourceArea () { + return sourceWidget; } bool SeerEditorWidgetSource::isSearchBarShown () const { - bool shown = false; - - // Go through the widgets in the search bar to see if any are visable. - for (int i = 0; i != searchBarLayout->count(); ++i) { - QWidget* w = searchBarLayout->itemAt(i)->widget(); - if (w != 0) { - if (w->isVisible()) { - shown = true; - } - } - } - - return shown; + return searchBarWidget->isVisible(); } bool SeerEditorWidgetSource::searchMatchCase () const { @@ -88,19 +77,7 @@ bool SeerEditorWidgetSource::searchMatchCase () const { bool SeerEditorWidgetSource::isAlternateBarShown () const { - bool shown = false; - - // Go through the widgets in the search bar to see if any are visable. - for (int i = 0; i != alternateBarLayout->count(); ++i) { - QWidget* w = alternateBarLayout->itemAt(i)->widget(); - if (w != 0) { - if (w->isVisible()) { - shown = true; - } - } - } - - return shown; + return alternateBarWidget->isVisible(); } void SeerEditorWidgetSource::setKeySettings (const SeerKeySettings& settings) { @@ -131,21 +108,12 @@ const SeerKeySettings& SeerEditorWidgetSource::keySettings () const { void SeerEditorWidgetSource::showSearchBar (bool flag) { - // Go through the widgets in the search bar and hide/show them. - for (int i = 0; i != searchBarLayout->count(); ++i) { - QWidget* w = searchBarLayout->itemAt(i)->widget(); - if (w != 0) { - w->setVisible(flag); - } - } + searchBarWidget->setVisible(flag); // If 'show', give the searchTextLineEdit the focus. if (flag) { searchTextLineEdit->setFocus(Qt::MouseFocusReason); } - - // Update the layout. - searchBarLayout->update(); } void SeerEditorWidgetSource::setSearchMatchCase (bool flag) { @@ -158,21 +126,12 @@ void SeerEditorWidgetSource::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(); - if (w != 0) { - w->setVisible(flag); - } - } + alternateBarWidget->setVisible(flag); // If 'show', give the alternateLineEdit the focus. if (flag) { alternateLineEdit->setFocus(Qt::MouseFocusReason); } - - // Update the layout. - alternateBarLayout->update(); } void SeerEditorWidgetSource::handleSearchLineNumberLineEdit () { diff --git a/src/SeerEditorWidgetSource.ui b/src/SeerEditorWidgetSource.ui index 5f6a117..bbc93b8 100644 --- a/src/SeerEditorWidgetSource.ui +++ b/src/SeerEditorWidgetSource.ui @@ -15,77 +15,91 @@ - - - - - Add path to global list of alternate directories. - - - ... - - - - :/seer/resources/RelaxLightIcons/list-add.svg:/seer/resources/RelaxLightIcons/list-add.svg - - - - - - - - - - - - - - Close the alternate bar. - - - ... - - - - :/seer/resources/RelaxLightIcons/list-remove.svg:/seer/resources/RelaxLightIcons/list-remove.svg - - - - - - - Qt::Vertical - - - - - - - Enter path for alternate location. - - - Enter /path/to/alternate/location - - - true - - - - - - - Open file dialog for alternate location. - - - ... - - - - :/seer/resources/RelaxLightIcons/document-open.svg:/seer/resources/RelaxLightIcons/document-open.svg - - - - + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Add path to global list of alternate directories. + + + ... + + + + :/seer/resources/RelaxLightIcons/list-add.svg:/seer/resources/RelaxLightIcons/list-add.svg + + + + + + + + + + + + + + Close the alternate bar. + + + ... + + + + :/seer/resources/RelaxLightIcons/list-remove.svg:/seer/resources/RelaxLightIcons/list-remove.svg + + + + + + + Qt::Vertical + + + + + + + Enter path for alternate location. + + + Enter /path/to/alternate/location + + + true + + + + + + + Open file dialog for alternate location. + + + ... + + + + :/seer/resources/RelaxLightIcons/document-open.svg:/seer/resources/RelaxLightIcons/document-open.svg + + + + + @@ -98,113 +112,127 @@ - - - - - - 50 - 0 - - - - Enter text to search for. - - - Enter search text - - - true - - - - - - - Match Case - - - - - - - - - - - - - - Search for the next occurance. - - - ... - - - - :/seer/resources/RelaxLightIcons/go-down.svg:/seer/resources/RelaxLightIcons/go-down.svg - - - - - - - Search for the previous occurance. - - - ... - - - - :/seer/resources/RelaxLightIcons/go-up.svg:/seer/resources/RelaxLightIcons/go-up.svg - - - - - - - Qt::Vertical - - - - - - - - 50 - 0 - - - - Scroll to a specific line. - - - Go to line # - - - - - - - Qt::Vertical - - - - - - - Close the search bar. - - - ... - - - - :/seer/resources/RelaxLightIcons/list-remove.svg:/seer/resources/RelaxLightIcons/list-remove.svg - - - - + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 50 + 0 + + + + Enter text to search for. + + + Enter search text + + + true + + + + + + + Match Case + + + + + + + + + + + + + + Search for the next occurance. + + + ... + + + + :/seer/resources/RelaxLightIcons/go-down.svg:/seer/resources/RelaxLightIcons/go-down.svg + + + + + + + Search for the previous occurance. + + + ... + + + + :/seer/resources/RelaxLightIcons/go-up.svg:/seer/resources/RelaxLightIcons/go-up.svg + + + + + + + Qt::Vertical + + + + + + + + 50 + 0 + + + + Scroll to a specific line. + + + Go to line # + + + + + + + Qt::Vertical + + + + + + + Close the search bar. + + + ... + + + + :/seer/resources/RelaxLightIcons/list-remove.svg:/seer/resources/RelaxLightIcons/list-remove.svg + + + + + @@ -221,6 +249,18 @@
QHistoryLineEdit.h
+ + alternateLineEdit + alternateFileOpenToolButton + alternateAddToGlobalToolButton + alternateCloseToolButton + searchTextLineEdit + matchCaseCheckBox + searchDownToolButton + searchUpToolButton + searchLineNumberLineEdit + searchCloseToolButton +