MainWindow.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 MAINWINDOW_H
00024 #define MAINWINDOW_H
00025 
00026 #include "UIs/NetworkTab.h"
00027 #include "UIs/Searching/SearchTab.h"
00028 #include "UIs/Searching/SearchingWidget.h"
00029 #include "Gnutella/LocalPeer.h"
00030 #include "UIs/MenuBar.h"
00031 
00032 using Gnutella::LocalPeer;
00033 using UIs::Searching::SearchingWidget;
00034 using UIs::NetworkTab;
00035 
00036 class QDialog;
00037 
00038 class MainWindow : public QMainWindow
00039 {
00040     Q_OBJECT
00041     REFERENCE_OBJECT (MainWindow)
00042 
00043 public:
00044     MainWindow(QWidget *parent = 0);
00045     ~MainWindow();
00046 
00047 private:
00048     QMenuBar        *menuBar;
00049     QPushButton     *newSearchButton;
00050     QPushButton     *downloadButton;
00051     QTabWidget      *tabWidget;
00052     QLineEdit       *peerIpAddress;
00053     QLineEdit       *peerPort;
00054     QPushButton     *connectButton;
00055     QTreeView       *packetTreeView;
00056     LocalPeer       *localPeer;
00057 
00058     NetworkTab      *newtorkTab;
00059     SearchingWidget *searchingResultsTab;
00060 
00061 private slots:
00062     void connectToPeer();
00063     void newSearchButtonPressed(void);
00064     void downloadButtonPressed(/*s_m ToDo */);
00065     void updateTime();
00066     void packetDumpTriggered();
00067     void closeSearchingTabTrigged();
00068 
00069 public:
00070     void initializeMenuBar();
00071 
00072 public slots:
00073     void exitTriggered();
00074 };
00075 
00076 #endif // MAINWINDOW_H