SearchQueryView.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 2006-2007 by Peter Dimov.
00004 
00005 This file is part of Calitko (http://www.calitko.org).
00006 
00007 Calitko is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2 of the License, or
00010 (at your option) any later version.
00011 
00012 Calitko is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Calitko; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021 */
00022 #ifndef UIS__SEARCHING__SEARCH_QUERY_VIEW_H
00023 #define UIS__SEARCHING__SEARCH_QUERY_VIEW_H
00024 
00025 #include "SearchModel.h"
00026 #include "AdvancedSearchWidget.h"
00027 
00028 namespace   UIs
00029 {
00030 namespace   Searching
00031 {
00032 
00033 class   SearchTab;
00034 
00035 class SearchQueryView :
00036     public QVBoxLayout
00037 {
00038     Q_OBJECT
00039     REFERENCE_OBJECT (SearchQueryView)
00040 
00041     enum ResourceType
00042     {
00043         MusicResourceType,
00044         VideoResourceType,
00045         HostResourceType
00046     };
00047 
00048 public:
00049                     SearchQueryView (QObject *parent);
00050                     ~SearchQueryView ();
00051     const QString   query () const;
00052 
00053 private:
00054     QLineEdit   *searchText;
00055     QPushButton *searchButton;
00056     QPushButton *stopSearchButton;
00057     QHBoxLayout *buttonLayout;
00058     QComboBox   *typeComboBox;
00059     QPushButton *advancedButton;
00060 
00061     QWidget     *advancedSearchWidget;
00062 
00063     void         LoadXMLSchemas();
00064 signals:
00065     void        startSearch ();
00066     void        stopSearch ();
00067 
00068 public slots:
00069     void        startSearchButtonPressed();
00070     void        stopSearchButtonPressed ();
00071     void        typeIndexChanged (int index);
00072 
00073     void        setAuthorMetaInfo(QString info);
00074     void        setAlbumMetaInfo(QString info);
00075     void        setGenreMetaInfo(QString info);
00076     void        setBitrateMetaInfo(QString info);
00077     void        setDurationMetaInfo(QString info);
00078     void        setWidthMetaInfo(QString info);
00079     void        setHeightMetaInfo(QString info);
00080 };
00081 
00082 }   // namespace Searching
00083 }   // namespace UIs
00084 
00085 #endif // UIS__SEARCHING__SEARCH_QUERY_VIEW_H