Exemplo n.º 1
0
void Grid::SetDimension(uint32_t width, uint32_t height)
{
	int cellCountDiff = width * height - dimension.x * dimension.y;

	// Add cells
	if (cellCountDiff >= 0)
	{
		for (int i = 0; i < cellCountDiff; ++i)
		{
			Gui* cell = AddGui();
			cell->DisableHover();
			cells.push_back(cell);
		}
	}
	else // Remove cells
	{
		for (int i = 0; i < -cellCountDiff; ++i)
		{
			Gui* cell = cells[cells.size() - 1 - i];
			cell->RemoveFromParent();
		}
		cells.resize(cells.size() + cellCountDiff);
	}

	Vec2i dimensionDiff = Vec2i(width - dimension.x, height - dimension.y);

	// Add columns
	if (dimensionDiff.x >= 0)
	{
		for (int i = 0; i < dimensionDiff.x; ++i)
			columns.push_back(GridColumn(columns.size() + i, this));
	}
	else // Remove columns
	{
		columns.resize(columns.size() + dimensionDiff.x);
	}

	// Add rows
	if (dimensionDiff.y >= 0)
	{
		for (int i = 0; i < dimensionDiff.y; ++i)
			rows.push_back(GridRow(rows.size() + i, this));
	}
	else // Remove rows
	{
		rows.resize(rows.size() + dimensionDiff.y);
	}

	dimension = Vec2u(width, height);
}
Exemplo n.º 2
0
   // FilterSplitter->Maximized = true;
}
void TMultDispFrame::setContest( BaseContestLog *pct )
{
   ct = pct;
   StatsDispFrame->setContest( ct );
   initFilters();
   reInitialiseCountries();
   reInitialiseDistricts();
   reInitialiseLocators();
   reInitialiseStats();
}
//---------------------------------------------------------------------------
static GridColumn CountryTreeColumns[ ectMultMaxCol ] =
   {
      GridColumn( ectCall, "XXXXXX", "Call", taLeftJustify ),
      GridColumn( ectWorked, "Wk CtX", "Wkd", taCenter ),
      GridColumn( ectLocator, "MM00MM00", "Locator", taLeftJustify ),
      GridColumn( ectBearing, "BRGXXX", "brg", taCenter ),
      GridColumn( ectName, "This is a very long country", "Country", taLeftJustify ),
      GridColumn( ectOtherCalls, "This is a very very very very long country name", "Other calls", taLeftJustify /*taRightJustify*/ )
   };
void TMultDispFrame::reInitialiseCountries()
{
   CountryMultTree->RootNodeCount = 0;
   if ( !ct )
   {
      // clear down
      return ;
   }
   CountryMultTree->BeginUpdate();
Exemplo n.º 3
0
      return ;
   MatchNodeData *MatchTreeIndex = ( MatchNodeData * ) ( ArchiveMatchTree->GetNodeData( sel ) );
   BaseContestLog *mclp = MatchTreeIndex->matchedContest;
   if ( MatchTreeIndex && mclp && MatchTreeIndex->matchedContact )
   {
      if ( MinosParameters::getMinosParameters() ->yesNoMessage( this, "ARCHIVE LIST - Do you wish to switch?" ) )
      {
         LogContainer->selectContest( MatchTreeIndex->matchedContest, MatchTreeIndex->matchedContact );
      }
      ArchiveMatchTree->Repaint();
   }
}
//---------------------------------------------------------------------------
static GridColumn ThisMatchTreeColumns[ THISMATCHTREECOLS ] =
   {
      GridColumn( egTime, "XXXXXXXXXX", "UTC", taLeftJustify ),               // time
      GridColumn( egCall, "MMMMMMMMMMM", "Callsign", taLeftJustify ),         // call
      GridColumn( egRSTTx, "599XXX", "RepTx", taLeftJustify ),                 // RST
      GridColumn( egSNTx, "1234X", "SnTx", taLeftJustify /*taRightJustify*/ ),   // serial
      GridColumn( egRSTRx, "599XXX", "RepRx", taLeftJustify ),                 // RST
      GridColumn( egSNRx, "1234X", "SnRx", taLeftJustify /*taRightJustify*/ ),   // Serial
      GridColumn( egLoc, "MM00MM00X", "Loc", taLeftJustify ),            // LOC
      GridColumn( egBrg, "3601X", "brg", taLeftJustify ),                // bearing
      GridColumn( egScore, "12345XX", "dist", taLeftJustify /*taRightJustify*/ ),  // score
      GridColumn( egExchange, "XXXXXXXXXXXXXXXX", "Exchange", taLeftJustify ),    // QTH
      GridColumn( egComments, "XXXXXXXXXXXXXXXX", "Comments", taLeftJustify )     // comments
   };
//---------------------------------------------------------------------------
static GridColumn OtherMatchTreeColumns[ OTHERMATCHTREECOLS ] =
   {
      GridColumn( egCall, "MMMMMMMMMMM", "Callsign", taLeftJustify ),         // call
Exemplo n.º 4
0
#include "MinosVer.h"   // updated by SubWCRev
#include "CompDisp.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "VirtualTrees"
#pragma resource "*.dfm"
TCompFrame *CompFrame;
//---------------------------------------------------------------------------
std::vector<ContestScore> scores;
//---------------------------------------------------------------------------
enum eCompGridCols {egtName, egtQSOs, egtPoints, egtCountries, egtDistricts, egtLocs, egtMults, egtScore,
                    egtCompMaxCol
                   };
static GridColumn CompGridColumns[ egtCompMaxCol ] =
   {
      GridColumn( egtName, "This is a Contest", "Name", taLeftJustify ),
      GridColumn( egtQSOs, "123", "QSOs", taCenter ),
      GridColumn( egtPoints, "XX100000", "Pts", taLeftJustify ),
      GridColumn( egtCountries, "XX123", "Ctry", taCenter ),
      GridColumn( egtDistricts, "XX123", "Dist", taCenter ),
      GridColumn( egtLocs, "XX123", "Locs", taCenter ),
      GridColumn( egtMults, "XX1234", "Mlt", taCenter ),
      GridColumn( egtScore, "XX123456", "Score", taCenter )
   };
//---------------------------------------------------------------------------
__fastcall TCompFrame::TCompFrame(TComponent* Owner)
   : TFrame(Owner), ct( 0 )
{
#ifdef BETA_VERSION
   CompGrid->BeginUpdate();