search done
authortimkoma <timkoma@localhost>
Tue, 26 Jan 2010 10:09:37 +0000 (10:09 +0000)
committertimkoma <timkoma@localhost>
Tue, 26 Jan 2010 10:09:37 +0000 (10:09 +0000)
src/gui/mainwindow.cpp
src/gui/mainwindow.ui
src/icons.qrc
src/icons/search.png [new file with mode: 0644]

index 1429731..17ae65b 100644 (file)
@@ -260,7 +260,7 @@ void MainWindow::updateSearchView(const QDate &aDate)
     if( eventsCount ||
             searchDayNavigator->getCurrentDate() != Conference::getById(AppSettings::confId()).start() ){
         searchVerticalWidget->show();
-        searchAgainButton->show();
+        //searchAgainButton->show();
         searchTreeView->show();
         searchHead->hide();
     }
@@ -336,13 +336,19 @@ void MainWindow::searchClicked()
     qDebug() << "\nKeyword to search: " << keyword;
     mSqlEngine->searchEvent( AppSettings::confId(), columns, keyword );
 
+    QDate aStartDate = Conference::getById(AppSettings::confId()).start();
+    QDate aEndDate = Conference::getById(AppSettings::confId()).end();
+    searchDayNavigator->setDates(aStartDate, aEndDate);
     updateSearchView( Conference::getById(AppSettings::confId()).start() );
 }
 
 void MainWindow::searchAgainClicked()
 {
     searchHead->show();
-    searchAgainButton->hide();
+    //searchAgainButton->hide();
+    searchVerticalWidget->hide();
+    searchTreeView->hide();
+
 }
 
 void MainWindow::conferenceMapClicked()
index 76ef13c..d6932b2 100644 (file)
         </item>
        </layout>
       </widget>
-      <widget class="QWidget" name="searchTab" >
-       <attribute name="title" >
+      <widget class="QWidget" name="searchTab">
+       <attribute name="title">
         <string>Search</string>
        </attribute>
-       <layout class="QHBoxLayout" name="horizontalLayout_1" >
+       <layout class="QHBoxLayout" name="horizontalLayout_1">
         <item>
-         <widget class="QWidget" native="1" name="searchVerticalWidget" >
-          <property name="enabled" >
+         <widget class="QWidget" name="searchVerticalWidget" native="true">
+          <property name="enabled">
            <bool>true</bool>
           </property>
-          <property name="sizePolicy" >
-           <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
-          <layout class="QVBoxLayout" name="searchDayNavigatorVerticalLayout" >
+          <layout class="QVBoxLayout" name="searchDayNavigatorVerticalLayout">
+           <property name="margin">
+            <number>0</number>
+           </property>
            <item>
-            <widget class="QToolButton" name="searchAgainButton" >
-             <property name="toolTip" >
+            <widget class="QToolButton" name="searchAgainButton">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="toolTip">
               <string>Search again</string>
              </property>
-             <property name="text" >
+             <property name="autoFillBackground">
+              <bool>false</bool>
+             </property>
+             <property name="text">
               <string>S</string>
              </property>
-             <property name="toolButtonStyle" >
-              <enum>Qt::ToolButtonTextOnly</enum>
+             <property name="icon">
+              <iconset resource="../icons.qrc">
+               <normaloff>:/icons/search.png</normaloff>:/icons/search.png</iconset>
+             </property>
+             <property name="iconSize">
+              <size>
+               <width>24</width>
+               <height>24</height>
+              </size>
+             </property>
+             <property name="toolButtonStyle">
+              <enum>Qt::ToolButtonIconOnly</enum>
              </property>
             </widget>
            </item>
            <item>
-            <widget class="DayNavigatorWidget" native="1" name="searchDayNavigator" >
-             <property name="maximumSize" >
+            <widget class="DayNavigatorWidget" name="searchDayNavigator" native="true">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximumSize">
               <size>
                <width>16777215</width>
                <height>16777215</height>
          </widget>
         </item>
         <item>
-         <layout class="QVBoxLayout" name="verticalLayout_3" >
+         <layout class="QVBoxLayout" name="verticalLayout_3">
           <item>
-           <widget class="QWidget" native="1" name="searchHead" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+           <widget class="QWidget" name="searchHead" native="true">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="maximumSize" >
+            <property name="maximumSize">
              <size>
               <width>16777215</width>
               <height>16777215</height>
              </size>
             </property>
-            <layout class="QGridLayout" name="searchHeadLayout" >
-             <property name="sizeConstraint" >
+            <layout class="QGridLayout" name="searchHeadLayout">
+             <property name="sizeConstraint">
               <enum>QLayout::SetDefaultConstraint</enum>
              </property>
-             <item row="2" column="0" >
-              <layout class="QHBoxLayout" name="horizontalLayout" >
+             <item row="2" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout">
                <item>
-                <widget class="QLineEdit" name="searchEdit" >
-                 <property name="enabled" >
+                <widget class="QLineEdit" name="searchEdit">
+                 <property name="enabled">
                   <bool>true</bool>
                  </property>
-                 <property name="toolTip" >
+                 <property name="toolTip">
                   <string>type a keyword to search</string>
                  </property>
                 </widget>
                </item>
                <item>
-                <widget class="QPushButton" name="searchButton" >
-                 <property name="text" >
+                <widget class="QPushButton" name="searchButton">
+                 <property name="text">
                   <string>Search</string>
                  </property>
-                 <property name="checkable" >
+                 <property name="icon">
+                  <iconset resource="../icons.qrc">
+                   <normaloff>:/icons/search.png</normaloff>:/icons/search.png</iconset>
+                 </property>
+                 <property name="checkable">
                   <bool>false</bool>
                  </property>
-                 <property name="autoDefault" >
+                 <property name="autoDefault">
                   <bool>true</bool>
                  </property>
-                 <property name="default" >
+                 <property name="default">
                   <bool>true</bool>
                  </property>
-                 <property name="flat" >
+                 <property name="flat">
                   <bool>false</bool>
                  </property>
                 </widget>
                </item>
               </layout>
              </item>
-             <item row="0" column="0" >
-              <layout class="QHBoxLayout" name="horizontalLayout_6" >
+             <item row="0" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_6">
                <item>
-                <widget class="QCheckBox" name="searchTitle" >
-                 <property name="text" >
+                <widget class="QCheckBox" name="searchTitle">
+                 <property name="text">
                   <string>Title</string>
                  </property>
-                 <property name="checked" >
+                 <property name="checked">
                   <bool>true</bool>
                  </property>
                 </widget>
                </item>
                <item>
-                <widget class="QCheckBox" name="searchAbstract" >
-                 <property name="text" >
+                <widget class="QCheckBox" name="searchAbstract">
+                 <property name="text">
                   <string>Abstract</string>
                  </property>
                 </widget>
                </item>
                <item>
-                <widget class="QCheckBox" name="searchSpeaker" >
-                 <property name="text" >
+                <widget class="QCheckBox" name="searchSpeaker">
+                 <property name="text">
                   <string>Speaker</string>
                  </property>
                 </widget>
                </item>
                <item>
-                <widget class="QCheckBox" name="searchTag" >
-                 <property name="text" >
+                <widget class="QCheckBox" name="searchTag">
+                 <property name="text">
                   <string>Tag</string>
                  </property>
                 </widget>
                </item>
                <item>
-                <widget class="QCheckBox" name="searchRoom" >
-                 <property name="text" >
+                <widget class="QCheckBox" name="searchRoom">
+                 <property name="text">
                   <string>Room</string>
                  </property>
                 </widget>
                </item>
                <item>
-                <spacer name="horizontalSpacer" >
-                 <property name="orientation" >
+                <spacer name="horizontalSpacer">
+                 <property name="orientation">
                   <enum>Qt::Horizontal</enum>
                  </property>
-                 <property name="sizeHint" stdset="0" >
+                 <property name="sizeHint" stdset="0">
                   <size>
                    <width>40</width>
                    <height>20</height>
            </widget>
           </item>
           <item>
-           <widget class="TreeView" name="searchTreeView" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
+           <widget class="TreeView" name="searchTreeView">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
               <horstretch>0</horstretch>
               <verstretch>1</verstretch>
              </sizepolicy>
             </property>
-            <property name="minimumSize" >
+            <property name="minimumSize">
              <size>
               <width>0</width>
               <height>0</height>
              </size>
             </property>
-            <property name="maximumSize" >
+            <property name="maximumSize">
              <size>
               <width>16777215</width>
               <height>16777215</height>
              </size>
             </property>
+            <attribute name="headerDefaultSectionSize">
+             <number>100</number>
+            </attribute>
            </widget>
           </item>
           <item>
-           <spacer name="verticalSpacer_2" >
-            <property name="orientation" >
+           <spacer name="verticalSpacer_2">
+            <property name="orientation">
              <enum>Qt::Vertical</enum>
             </property>
-            <property name="sizeType" >
+            <property name="sizeType">
              <enum>QSizePolicy::Expanding</enum>
             </property>
-            <property name="sizeHint" stdset="0" >
+            <property name="sizeHint" stdset="0">
              <size>
               <width>20</width>
               <height>1</height>
index 434d3a3..808d862 100644 (file)
@@ -11,5 +11,6 @@
         <file>icons/exclamation-iconOn.png</file>
         <file>icons/exclamation-iconOff.png</file>
         <file>icons/info.png</file>
+        <file>icons/search.png</file>
     </qresource>
 </RCC>
diff --git a/src/icons/search.png b/src/icons/search.png
new file mode 100644 (file)
index 0000000..0dacd00
Binary files /dev/null and b/src/icons/search.png differ