summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/cellformat.cpp14
-rw-r--r--noncore/apps/opie-sheet/cellformat.h14
-rw-r--r--noncore/apps/opie-sheet/finddlg.cpp14
-rw-r--r--noncore/apps/opie-sheet/finddlg.h14
-rw-r--r--noncore/apps/opie-sheet/main.cpp14
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp14
-rw-r--r--noncore/apps/opie-sheet/mainwindow.h14
-rw-r--r--noncore/apps/opie-sheet/numberdlg.cpp14
-rw-r--r--noncore/apps/opie-sheet/numberdlg.h14
-rw-r--r--noncore/apps/opie-sheet/sheet.cpp14
-rw-r--r--noncore/apps/opie-sheet/sheet.h14
-rw-r--r--noncore/apps/opie-sheet/sortdlg.cpp14
-rw-r--r--noncore/apps/opie-sheet/sortdlg.h14
-rw-r--r--noncore/apps/opie-sheet/textdlg.cpp14
-rw-r--r--noncore/apps/opie-sheet/textdlg.h14
15 files changed, 210 insertions, 0 deletions
diff --git a/noncore/apps/opie-sheet/cellformat.cpp b/noncore/apps/opie-sheet/cellformat.cpp
index 6a2ff72..597502c 100644
--- a/noncore/apps/opie-sheet/cellformat.cpp
+++ b/noncore/apps/opie-sheet/cellformat.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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 "cellformat.h"
#include <qlistbox.h>
#include <qlabel.h>
#define COMBO_WIDTHS 155
#define COMBO_HEIGHTS 21
#define COLOR_COUNT 17
#define STYLE_COUNT 14
#define HALIGN_COUNT 3
#define VALIGN_COUNT 3
QColor qtColors[COLOR_COUNT]={Qt::black, Qt::white, Qt::darkGray, Qt::gray, Qt::lightGray, Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::darkRed, Qt::darkGreen, Qt::darkBlue, Qt::darkCyan, Qt::darkMagenta, Qt::darkYellow};
Qt::BrushStyle brushStyles[STYLE_COUNT]={Qt::SolidPattern, Qt::Dense1Pattern, Qt::Dense2Pattern, Qt::Dense3Pattern, Qt::Dense4Pattern, Qt::Dense5Pattern, Qt::Dense6Pattern, Qt::Dense7Pattern, Qt::HorPattern, Qt::VerPattern, Qt::CrossPattern, Qt::BDiagPattern, Qt::FDiagPattern, Qt::DiagCrossPattern};
QString namesHAlign[HALIGN_COUNT]={"Left", "Right", "Center"};
QString namesVAlign[VALIGN_COUNT]={"Top", "Bottom", "Center"};
Qt::AlignmentFlags flagsHAlign[HALIGN_COUNT]={Qt::AlignLeft, Qt::AlignRight, Qt::AlignHCenter};
Qt::AlignmentFlags flagsVAlign[VALIGN_COUNT]={Qt::AlignTop, Qt::AlignBottom, Qt::AlignVCenter};
CellFormat::CellFormat(QWidget *parent=0)
:QDialog(parent, 0, TRUE)
{
// Main widget
diff --git a/noncore/apps/opie-sheet/cellformat.h b/noncore/apps/opie-sheet/cellformat.h
index b552153..b569b7f 100644
--- a/noncore/apps/opie-sheet/cellformat.h
+++ b/noncore/apps/opie-sheet/cellformat.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef CELLFORMAT_H
#define CELLFORMAT_H
#include <qpe/fontdatabase.h>
#include <qdialog.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include "sheet.h"
class BorderEditor: public QFrame
{
Q_OBJECT
// QT objects
QPen penTop, penBottom, penLeft, penRight, penHorz, penVert;
// Private functions
void drawContents(QPainter *p);
// Reimplemented QFrame functions
diff --git a/noncore/apps/opie-sheet/finddlg.cpp b/noncore/apps/opie-sheet/finddlg.cpp
index cfe2f82..d1237ca 100644
--- a/noncore/apps/opie-sheet/finddlg.cpp
+++ b/noncore/apps/opie-sheet/finddlg.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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 <qlabel.h>
#include <qradiobutton.h>
#include "finddlg.h"
FindDialog::FindDialog(QWidget *parent=0)
:QDialog(parent, 0, TRUE)
{
// Main widget
tabs=new QTabWidget(this);
widgetFind=new QWidget(tabs);
widgetOptions=new QWidget(tabs);
tabs->addTab(widgetFind, tr("&Find && Replace"));
tabs->addTab(widgetOptions, tr("&Options"));
// Find tab
QLabel *label=new QLabel(tr("&Search for:"), widgetFind);
label->setGeometry(10, 10, 215, 20);
editFind=new QLineEdit(widgetFind);
editFind->setGeometry(10, 40, 215, 20);
label->setBuddy(editFind);
label=new QLabel(tr("&Replace with:"), widgetFind);
label->setGeometry(10, 80, 215, 20);
editReplace=new QLineEdit(widgetFind);
diff --git a/noncore/apps/opie-sheet/finddlg.h b/noncore/apps/opie-sheet/finddlg.h
index 02c9cdd..1af2da5 100644
--- a/noncore/apps/opie-sheet/finddlg.h
+++ b/noncore/apps/opie-sheet/finddlg.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef FINDDLG_H
#define FINDDLG_H
#include <qdialog.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qvbuttongroup.h>
#include "sheet.h"
class FindDialog: public QDialog
{
Q_OBJECT
// QT objects
QBoxLayout *box;
QTabWidget *tabs;
QWidget *widgetFind, *widgetOptions;
QCheckBox *checkCase, *checkSelection, *checkEntire;
QLineEdit *editFind, *editReplace;
QVButtonGroup *groupType;
diff --git a/noncore/apps/opie-sheet/main.cpp b/noncore/apps/opie-sheet/main.cpp
index 236a579..e42b4a5 100644
--- a/noncore/apps/opie-sheet/main.cpp
+++ b/noncore/apps/opie-sheet/main.cpp
@@ -1,14 +1,28 @@
+/***************************************************************************
+ * *
+ * 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 <qpe/qpeapplication.h>
#include "mainwindow.h"
int main(int argc, char **argv)
{
QPEApplication application(argc, argv);
MainWindow windowMain;
windowMain.setHelpFile(application.qpeDir()+"/help/html/"+QString(argv[0])+".html");
application.showMainDocumentWidget(&windowMain);
return application.exec();
}
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index a7441b1..9d69b8a 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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 "mainwindow.h"
#include <qpe/filemanager.h>
#include <qpe/qcopenvelope_qws.h>
#include <qmessagebox.h>
#include <qfile.h>
#include <qradiobutton.h>
#include "cellformat.h"
#include "numberdlg.h"
#include "textdlg.h"
#include "sortdlg.h"
#include "finddlg.h"
#include "file-new.xpm"
#include "file-open.xpm"
#include "file-save.xpm"
#include "edit-cancel.xpm"
#include "edit-accept.xpm"
#include "help-general.xpm"
#include "func-plus.xpm"
#include "func-minus.xpm"
#include "func-cross.xpm"
#include "func-divide.xpm"
#include "func-paran-open.xpm"
diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h
index ac90504..554e6f6 100644
--- a/noncore/apps/opie-sheet/mainwindow.h
+++ b/noncore/apps/opie-sheet/mainwindow.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <qpe/applnk.h>
#include <qpe/fileselector.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qmainwindow.h>
#include <qaction.h>
#include <qlineedit.h>
#include <qbutton.h>
#include <qcombobox.h>
#include <qtoolbutton.h>
#include "sheet.h"
typedef struct typeSheet
{
QString name;
QList<typeCellData> data;
};
class MainWindow: public QMainWindow
{
diff --git a/noncore/apps/opie-sheet/numberdlg.cpp b/noncore/apps/opie-sheet/numberdlg.cpp
index de84378..e8de639 100644
--- a/noncore/apps/opie-sheet/numberdlg.cpp
+++ b/noncore/apps/opie-sheet/numberdlg.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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 "numberdlg.h"
NumberDialog::NumberDialog(QWidget *parent=0)
:QDialog(parent, 0, TRUE)
{
edit=new QSpinBox(this);
edit->setGeometry(120, 10, 70, 25);
label=new QLabel(this);
label->setGeometry(10, 10, 100, 25);
label->setBuddy(edit);
resize(200, 45);
}
NumberDialog::~NumberDialog()
{
}
int NumberDialog::exec(const QString &caption, const QString &text, int value=1, int min=1, int max=99, int step=1)
{
setCaption(caption);
label->setText(text);
edit->setValue(value);
diff --git a/noncore/apps/opie-sheet/numberdlg.h b/noncore/apps/opie-sheet/numberdlg.h
index 46af1d0..81e3326 100644
--- a/noncore/apps/opie-sheet/numberdlg.h
+++ b/noncore/apps/opie-sheet/numberdlg.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef NUMBERDLG_H
#define NUMBERDLG_H
#include <qdialog.h>
#include <qlabel.h>
#include <qspinbox.h>
class NumberDialog: public QDialog
{
Q_OBJECT
// QT objects
QLabel *label;
QSpinBox *edit;
public:
NumberDialog(QWidget *parent=0);
~NumberDialog();
int exec(const QString &caption, const QString &text, int value=1, int min=1, int max=99, int step=1);
int getValue();
};
#endif
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp
index 9526937..1d7ec6f 100644
--- a/noncore/apps/opie-sheet/sheet.cpp
+++ b/noncore/apps/opie-sheet/sheet.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
#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;
selectionNo=-1;
setSelectionMode(QTable::Single);
sheetData.setAutoDelete(TRUE);
clipboardData.setAutoDelete(TRUE);
diff --git a/noncore/apps/opie-sheet/sheet.h b/noncore/apps/opie-sheet/sheet.h
index 02899a0..f78a684 100644
--- a/noncore/apps/opie-sheet/sheet.h
+++ b/noncore/apps/opie-sheet/sheet.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef SHEET_H
#define SHEET_H
#include <qtable.h>
#include <qstack.h>
typedef struct typeCellBorders
{
QPen right, bottom;
};
typedef struct typeCellData
{
int col, row;
typeCellBorders borders;
QBrush background;
Qt::AlignmentFlags alignment;
QColor fontColor;
QFont font;
QString data;
};
class Sheet: public QTable
{
diff --git a/noncore/apps/opie-sheet/sortdlg.cpp b/noncore/apps/opie-sheet/sortdlg.cpp
index f46562e..4f18fd3 100644
--- a/noncore/apps/opie-sheet/sortdlg.cpp
+++ b/noncore/apps/opie-sheet/sortdlg.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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 <qlabel.h>
#include <qradiobutton.h>
#include <qmessagebox.h>
#include "sortdlg.h"
SortDialog::SortDialog(QWidget *parent=0)
:QDialog(parent, 0, TRUE)
{
// Main widget
tabs=new QTabWidget(this);
widgetSort=new QWidget(tabs);
widgetOptions=new QWidget(tabs);
tabs->addTab(widgetSort, tr("&Sort"));
tabs->addTab(widgetOptions, tr("&Options"));
// Sort tab
comboFieldA=createFieldCombo(tr("&Sort by"), 10);
groupOrderA=createOrderButtons(10);
comboFieldB=createFieldCombo(tr("&Then by"), 90);
groupOrderB=createOrderButtons(90);
comboFieldC=createFieldCombo(tr("Then &by"), 170);
groupOrderC=createOrderButtons(170);
// Options tab
diff --git a/noncore/apps/opie-sheet/sortdlg.h b/noncore/apps/opie-sheet/sortdlg.h
index 2c99f02..b3699a9 100644
--- a/noncore/apps/opie-sheet/sortdlg.h
+++ b/noncore/apps/opie-sheet/sortdlg.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef SORTDLG_H
#define SORTDLG_H
#include <qdialog.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qvbuttongroup.h>
#include "sheet.h"
class SortDialog: public QDialog
{
Q_OBJECT
// QT objects
QBoxLayout *box;
QTabWidget *tabs;
QWidget *widgetSort, *widgetOptions;
QVButtonGroup *groupOrderA, *groupOrderB, *groupOrderC, *groupDirection;
QCheckBox *checkCase;
QComboBox *comboFieldA, *comboFieldB, *comboFieldC;
diff --git a/noncore/apps/opie-sheet/textdlg.cpp b/noncore/apps/opie-sheet/textdlg.cpp
index 8245fe4..0810eb2 100644
--- a/noncore/apps/opie-sheet/textdlg.cpp
+++ b/noncore/apps/opie-sheet/textdlg.cpp
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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 "textdlg.h"
TextDialog::TextDialog(QWidget *parent=0)
:QDialog(parent, 0, TRUE)
{
edit=new QLineEdit(this);
edit->setGeometry(90, 10, 100, 25);
label=new QLabel(this);
label->setGeometry(10, 10, 70, 25);
label->setBuddy(edit);
resize(200, 45);
}
TextDialog::~TextDialog()
{
}
int TextDialog::exec(const QString &caption, const QString &text, const QString &value="")
{
setCaption(caption);
label->setText(text);
edit->setText(value);
diff --git a/noncore/apps/opie-sheet/textdlg.h b/noncore/apps/opie-sheet/textdlg.h
index f948228..78ef580 100644
--- a/noncore/apps/opie-sheet/textdlg.h
+++ b/noncore/apps/opie-sheet/textdlg.h
@@ -1,24 +1,38 @@
+/***************************************************************************
+ * *
+ * 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>
+ */
+
#ifndef TEXTDLG_H
#define TEXTDLG_H
#include <qdialog.h>
#include <qlabel.h>
#include <qlineedit.h>
class TextDialog: public QDialog
{
Q_OBJECT
// QT objects
QLabel *label;
QLineEdit *edit;
public:
TextDialog(QWidget *parent=0);
~TextDialog();
int exec(const QString &caption, const QString &text, const QString &value="");
QString getValue();
};
#endif