summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/sheet.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-sheet/sheet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/sheet.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp
index e1e4744..f303d33 100644
--- a/noncore/apps/opie-sheet/sheet.cpp
+++ b/noncore/apps/opie-sheet/sheet.cpp
@@ -1,65 +1,64 @@
/***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/*
* Opie Sheet (formerly Sheet/Qt)
* by Serdar Ozler <sozler@sitebest.com>
*/
#include "sheet.h"
-#include <qmainwindow.h>
#include <qmessagebox.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#define DEFAULT_COL_WIDTH 50
Sheet::Sheet(int numRows, int numCols, QWidget *parent)
:QTable(numRows, numCols, parent)
{
defaultBorders.right=defaultBorders.bottom=QPen(Qt::gray, 1, Qt::SolidLine);
defaultCellData.data="";
defaultCellData.background=QBrush(Qt::white, Qt::SolidPattern);
defaultCellData.alignment=(Qt::AlignmentFlags)(Qt::AlignLeft | Qt::AlignTop);
defaultCellData.fontColor=Qt::black;
defaultCellData.font=font();
defaultCellData.borders=defaultBorders;
clicksLocked=FALSE;
selectionNo=-1;
setSelectionMode(QTable::Single);
sheetData.setAutoDelete(TRUE);
clipboardData.setAutoDelete(TRUE);
for (int i=0; i<numCols; ++i)
horizontalHeader()->setLabel(i, getHeaderString(i+1), DEFAULT_COL_WIDTH);
connect(this, SIGNAL(currentChanged(int, int)), this, SLOT(slotCellSelected(int, int)));
connect(this, SIGNAL(valueChanged(int, int)), this, SLOT(slotCellChanged(int, int)));
}
Sheet::~Sheet()
{
}
typeCellData *Sheet::findCellData(int row, int col)
{
typeCellData *tempCellData;
for (tempCellData=sheetData.first(); tempCellData; tempCellData=sheetData.next())
{
if (tempCellData->row==row && tempCellData->col==col) return tempCellData;
}
return NULL;
}
void Sheet::slotCellSelected(int row, int col)