SearchTab.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 2005-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 
00023 #ifndef SEARCHTAB_H
00024 #define SEARCHTAB_H
00025 
00026 #include "SearchTreeView.h"
00027 #include "Gnutella/LocalPeer.h"
00028 #include "SearchQueryView.h"
00029 
00030 using Gnutella::LocalPeer;
00031 
00032 namespace UIs {
00033 namespace Searching {
00035 
00036 #define MAX_TABTEXT_LEN 15
00037 
00038 class SearchTab : public QWidget
00039 {
00040     Q_OBJECT
00041     REFERENCE_OBJECT (SearchTab)
00042 
00043 public:
00044     SearchTab (SearchTreeView *searchTreeView, LocalPeer *localPeer, QTabWidget *tabWidget, QWidget * parent = 0);
00045     ~SearchTab();
00046 
00047 private:
00048     SearchTreeView *treeView;
00049     QTabWidget  *tabWidget;
00050     SearchModel *searchModel;
00051 //  QLineEdit   *searchText;
00052 //  QPushButton *searchButton;
00053 //  QPushButton *stopSearchButton;
00054     QHBoxLayout *buttonLayout;
00055     SearchQueryView *queryView;
00056     QHBoxLayout *searchLayout;
00057     LocalPeer   *localPeer;
00058 
00059     bool wasActive;
00060     bool isSearching;
00061 
00062 public slots: 
00063     void startSearch();
00064     void stopSearch();
00065     void itemAdded();
00066 
00067 private slots:
00068     void currentTabChanged (int index);
00069 };
00070 
00071 } // namespace Searching
00072 } // namespace UIs
00074 
00075 #endif // SEARCHTAB_H