//
// QPerforce is a gui interface to the perforce revision control
// system. It is based on the qt library, and should be easily portable
// across any platform that has this toolkit available.
//
// Copyright (C) 2002 Jacob Gladish
//
// TODO: find legit copyright.
//
#ifndef __BRANCH_SPEC_MENU_H__
#define __BRANCH_SPEC_MENU_H__
#include "BranchSpec.h"
#include "WidgetID.h"
#include <qpopupmenu.h>
class BranchSpecTable;
class BranchSpecMenu : public QPopupMenu
{
Q_OBJECT
public:
BranchSpecMenu( QWidget* parent = 0, const char* name = 0 );
virtual ~BranchSpecMenu();
void setListView( BranchSpecTable* view );
typedef void (BranchSpecMenu::*BranchSpecMenuFuncPtr) ();
public slots:
void slotNew();
void slotEditSpec();
void slotDescribe();
void slotDelete();
void slotIntegrateFromSpec();
void slotViewBranches();
signals:
void showBranchSpecs( WidgetId id );
private:
BranchSpecTable* _branchSpecTable;
void _viewBranches();
};
//========================================================================
// The Widget to display the branchspecs.
//
class BranchSpecTable : public QListView
{
public:
BranchSpecTable( QWidget* parent = 0, const char* name = 0 );
void addBranchSpec( const Perforce::BranchSpec* scl );
};
#endif