/*KSlacky InfoPkg is a package information tool that provide
the list of packages installe on your Slackware system
Copyright (C) 2008  Giovanni Santostefano

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.*/

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
//including the main window
#include "ui_mainwindow.h"
#include "upgradewindow.h"
#include "installwindow.h"

class MainWindow : public QWidget
{
	Q_OBJECT
	public:
		MainWindow(QWidget *parent=0);
		~MainWindow();
		
		void PKGLoading();
	
	private slots:
		void PackageListIndexChange();
		void ExitButtonPressed();
		void AboutButtonPressed();
		void SearchButtonPressed();
		void SearchNextButtonPressed();
		void InstallPkgButtonPressed();
		void UpgradePkgButtonPressed();
		void RemovePkgButtonPressed();
		void RefreshButtonPressed();
		void InfoButtonPressed();
	
	private:
		void ShowFileInfo(int index);
		
	private:
		Ui::Form ui;
		InstallWindow iw;
		UpgradeWindow uw;
		int searchindex;
		QString pattern;
};

#endif
