Ignore:
Timestamp:
10/05/11 00:11:03 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
dc66a91
Parents:
a9430aa
Message:

Removed the "Now" tab.
Removed the day navigator inside tabs.
Added a search button in the button bar.

Right now, at least the following does not work:

  • update of favorites
  • conflict editor
  • setting favorite in the event dialog
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/searchtabcontainer.cpp

    ra9430aa r264f5e7  
    3434    header->setSizePolicy(sizePolicy);
    3535    header->setMinimumSize(QSize(10, 10));
    36 
    3736    verticalLayout->insertWidget(0,header);
    38 
    39     header->show();
    40 
    41     searchAgainButton = new QToolButton(this);
    42     searchAgainButton->setObjectName(QString::fromUtf8("button"));
    43     QIcon icon;
    44     icon.addPixmap(QPixmap(QString::fromUtf8(":/icons/search.png")), QIcon::Normal, QIcon::Off);
    45     searchAgainButton->setIcon(icon);
    46     QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Minimum);
    47     sizePolicy1.setHorizontalStretch(0);
    48     sizePolicy1.setVerticalStretch(0);
    49     sizePolicy1.setHeightForWidth(searchAgainButton->sizePolicy().hasHeightForWidth());
    50     searchAgainButton->setSizePolicy(sizePolicy1);
    51 
    52     verticalLayout_2->insertWidget(0,searchAgainButton);
    53 
    54     searchAgainButton->hide();
    55     treeView->hide();
    56     // do not show 'search' header if there are no conferences in the DB
    57     if(Conference::getAll().count()==0)
    58     {
    59         header->hide();
    60     }
    61 
    62     connect( header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
    63     connect( searchAgainButton, SIGNAL(clicked()), SLOT(searchAgainClicked()));
     37    connect(header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
     38    showSearchDialog();
    6439}
    6540
    66 SearchTabContainer::~SearchTabContainer()
    67 {
     41
     42void SearchTabContainer::showSearchDialog() {
     43    header->show();
     44    treeView->hide();
    6845}
    6946
    70 void SearchTabContainer::searchButtonClicked()
    71 {
     47
     48void SearchTabContainer::searchButtonClicked() {
    7249    QHash<QString,QString> columns;
    7350
     
    11996        // TODO: display some message
    12097        treeView->hide();
    121         searchAgainButton->hide();
    122         dayNavigator->hide();
    12398        header->show();
    12499        QMessageBox::information(
     
    130105    else
    131106    {
    132         searchAgainButton->show();
    133         dayNavigator->show();
    134107        treeView->show();
    135108        header->hide();
    136109
    137110        updateTreeView( firstDateWithFounds );
    138         dayNavigator->setDates(firstDateWithFounds, lastDateWithFounds);
    139111    }
    140112}
    141113
    142 void SearchTabContainer::searchAgainClicked()
    143 {
    144     header->show();
    145     searchAgainButton->hide();
    146     dayNavigator->hide();
    147     treeView->hide();
    148 }
    149114
    150115void SearchTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
Note: See TracChangeset for help on using the changeset viewer.