summaryrefslogtreecommitdiff
path: root/noncore
authorharlekin <harlekin>2002-08-01 00:47:09 (UTC)
committer harlekin <harlekin>2002-08-01 00:47:09 (UTC)
commitba034bf4cb91b83654056945fc27313a28528015 (patch) (side-by-side diff)
tree4df33783ca21017424135aacc2e45b94437cfdff /noncore
parent26ff0c72228b9c89b079dfa381d448b6152eb408 (diff)
downloadopie-ba034bf4cb91b83654056945fc27313a28528015.zip
opie-ba034bf4cb91b83654056945fc27313a28528015.tar.gz
opie-ba034bf4cb91b83654056945fc27313a28528015.tar.bz2
gcc3.x fixes
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/cellformat.cpp47
-rw-r--r--noncore/apps/opie-sheet/finddlg.cpp2
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp2
-rw-r--r--noncore/apps/opie-sheet/numberdlg.cpp5
-rw-r--r--noncore/apps/opie-sheet/sheet.cpp14
-rw-r--r--noncore/apps/opie-sheet/sortdlg.cpp5
-rw-r--r--noncore/apps/opie-sheet/textdlg.cpp5
-rw-r--r--noncore/tools/remote/helptab.cpp2
-rw-r--r--noncore/tools/remote/helptab.h7
-rw-r--r--noncore/tools/remote/recorddialog.cpp9
-rw-r--r--noncore/tools/remote/recorddialog.h8
11 files changed, 74 insertions, 32 deletions
diff --git a/noncore/apps/opie-sheet/cellformat.cpp b/noncore/apps/opie-sheet/cellformat.cpp
index 597502c..342ebe9 100644
--- a/noncore/apps/opie-sheet/cellformat.cpp
+++ b/noncore/apps/opie-sheet/cellformat.cpp
@@ -25,14 +25,35 @@
#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};
+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)
+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)
:QDialog(parent, 0, TRUE)
{
// Main widget
@@ -52,14 +73,18 @@ CellFormat::CellFormat(QWidget *parent=0)
// Borders tab
borderEditor=new BorderEditor(widgetBorders);
borderEditor->setGeometry(10, 10, 215, 145);
- connect(borderEditor, SIGNAL(clicked(BorderEditor::BorderArea)), this, SLOT(borderClicked(BorderEditor::BorderArea)));
+ connect(borderEditor, SIGNAL(clicked(BorderEditor::BorderArea)),
+ this, SLOT(borderClicked(BorderEditor::BorderArea)));
comboBordersWidth=createCombo(COMBO_WIDTH, widgetBorders, tr("&Width:"), 165);
comboBordersColor=createCombo(COMBO_COLOR, widgetBorders, tr("&Color:"), 165+(COMBO_HEIGHTS+10));
buttonBordersDefaults=new QPushButton(tr("&Default Borders"), widgetBorders);
- buttonBordersDefaults->setGeometry(115, 165+2*(COMBO_HEIGHTS+10), 110, COMBO_HEIGHTS);
- connect(buttonBordersDefaults, SIGNAL(clicked()), this, SLOT(slotBordersDefaults()));
+ buttonBordersDefaults->setGeometry(115, 165+2*(COMBO_HEIGHTS+10),
+ 110, COMBO_HEIGHTS);
+
+ connect(buttonBordersDefaults, SIGNAL(clicked()),
+ this, SLOT(slotBordersDefaults()));
// Background tab
frameBackground=new QFrame(widgetBackground);
@@ -292,7 +317,8 @@ int CellFormat::findComboItemIndex(QComboBox *combo, const QString &item)
return 0;
}
-QComboBox *CellFormat::createCombo(comboType type, QWidget *parent, const QString &caption, int y)
+QComboBox *CellFormat::createCombo(comboType type, QWidget *parent,
+ const QString &caption, int y)
{
QComboBox *combo=new QComboBox(FALSE, parent);
combo->setGeometry(70, y, COMBO_WIDTHS, COMBO_HEIGHTS);
@@ -307,6 +333,7 @@ QComboBox *CellFormat::createCombo(comboType type, QWidget *parent, const QStrin
case COMBO_COLOR: createColorCombo(combo); break;
case COMBO_HALIGN: createHAlignCombo(combo); break;
case COMBO_VALIGN: createVAlignCombo(combo); break;
+ default: break;
}
QLabel *label=new QLabel(combo, caption, parent);
@@ -495,7 +522,7 @@ int CellFormat::exec(Sheet *s)
// Border Editor
//
-BorderEditor::BorderEditor(QWidget *parent=0)
+BorderEditor::BorderEditor(QWidget *parent)
:QFrame(parent)
{
setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
diff --git a/noncore/apps/opie-sheet/finddlg.cpp b/noncore/apps/opie-sheet/finddlg.cpp
index d1237ca..e4c6ec8 100644
--- a/noncore/apps/opie-sheet/finddlg.cpp
+++ b/noncore/apps/opie-sheet/finddlg.cpp
@@ -16,7 +16,7 @@
#include <qradiobutton.h>
#include "finddlg.h"
-FindDialog::FindDialog(QWidget *parent=0)
+FindDialog::FindDialog(QWidget *parent)
:QDialog(parent, 0, TRUE)
{
// Main widget
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index 09ee68b..2f07bae 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -166,7 +166,7 @@ void MainWindow::documentOpen(const DocLnk &lnkDoc)
}
}
-int MainWindow::saveCurrentFile(bool ask=TRUE)
+int MainWindow::saveCurrentFile(bool ask)
{
if (ask)
{
diff --git a/noncore/apps/opie-sheet/numberdlg.cpp b/noncore/apps/opie-sheet/numberdlg.cpp
index e8de639..90fbaa2 100644
--- a/noncore/apps/opie-sheet/numberdlg.cpp
+++ b/noncore/apps/opie-sheet/numberdlg.cpp
@@ -14,7 +14,7 @@
#include "numberdlg.h"
-NumberDialog::NumberDialog(QWidget *parent=0)
+NumberDialog::NumberDialog(QWidget *parent)
:QDialog(parent, 0, TRUE)
{
edit=new QSpinBox(this);
@@ -31,7 +31,8 @@ NumberDialog::~NumberDialog()
{
}
-int NumberDialog::exec(const QString &caption, const QString &text, int value=1, int min=1, int max=99, int step=1)
+int NumberDialog::exec(const QString &caption, const QString &text,
+ int value, int min, int max, int step)
{
setCaption(caption);
label->setText(text);
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp
index 1d7ec6f..2279191 100644
--- a/noncore/apps/opie-sheet/sheet.cpp
+++ b/noncore/apps/opie-sheet/sheet.cpp
@@ -107,7 +107,7 @@ void Sheet::swapCells(int row1, int col1, int row2, int col2)
}
}
-QString Sheet::getParameter(const QString &parameters, int paramNo, bool giveError=FALSE, const QString funcName="")
+QString Sheet::getParameter(const QString &parameters, int paramNo, bool giveError, const QString funcName)
{
QString params(parameters);
int position;
@@ -145,7 +145,7 @@ bool Sheet::findRange(const QString &variable1, const QString &variable2, int *r
return TRUE;
}
-bool Sheet::findRowColumn(const QString &variable, int *row, int *col, bool giveError=FALSE)
+bool Sheet::findRowColumn(const QString &variable, int *row, int *col, bool giveError)
{
int position=variable.find(QRegExp("\\d"));
if (position<1)
@@ -452,7 +452,7 @@ QString Sheet::getData()
return "";
}
-void Sheet::lockClicks(bool lock=TRUE)
+void Sheet::lockClicks(bool lock)
{
clicksLocked=lock;
}
@@ -736,7 +736,7 @@ void Sheet::editCut()
editClear();
}
-void Sheet::editPaste(bool onlyContents=FALSE)
+void Sheet::editPaste(bool onlyContents)
{
int row1=currentRow(), col1=currentColumn();
typeCellData *cellData, *tempCellData;
@@ -761,7 +761,7 @@ void Sheet::editPaste(bool onlyContents=FALSE)
}
}
-void Sheet::insertRows(int no=1, bool allColumns=TRUE)
+void Sheet::insertRows(int no, bool allColumns)
{
setNumRows(numRows()+no);
@@ -783,7 +783,7 @@ void Sheet::insertRows(int no=1, bool allColumns=TRUE)
emit sheetModified();
}
-void Sheet::insertColumns(int no=1, bool allRows=TRUE)
+void Sheet::insertColumns(int no, bool allRows)
{
int noCols=numCols();
int newCols=noCols+no;
@@ -809,7 +809,7 @@ void Sheet::insertColumns(int no=1, bool allRows=TRUE)
emit sheetModified();
}
-void Sheet::dataFindReplace(const QString &findStr, const QString &replaceStr, bool matchCase=TRUE, bool allCells=TRUE, bool entireCell=FALSE, bool replace=FALSE, bool replaceAll=FALSE)
+void Sheet::dataFindReplace(const QString &findStr, const QString &replaceStr, bool matchCase, bool allCells, bool entireCell, bool replace, bool replaceAll)
{
typeCellData *tempCellData;
int row1, col1, row2, col2;
diff --git a/noncore/apps/opie-sheet/sortdlg.cpp b/noncore/apps/opie-sheet/sortdlg.cpp
index c60be0d..c2cdec8 100644
--- a/noncore/apps/opie-sheet/sortdlg.cpp
+++ b/noncore/apps/opie-sheet/sortdlg.cpp
@@ -17,7 +17,7 @@
#include <qmessagebox.h>
#include "sortdlg.h"
-SortDialog::SortDialog(QWidget *parent=0)
+SortDialog::SortDialog(QWidget *parent)
:QDialog(parent, 0, TRUE)
{
// Main widget
@@ -178,7 +178,8 @@ int SortDialog::exec(Sheet *s)
return QDialog::Rejected;
}
-int SortDialog::compareItems(QTableItem *item1, QTableItem *item2, int descending=0, bool caseSensitive=TRUE)
+int SortDialog::compareItems(QTableItem *item1, QTableItem *item2,
+ int descending, bool caseSensitive)
{
int result=0;
if (item1)
diff --git a/noncore/apps/opie-sheet/textdlg.cpp b/noncore/apps/opie-sheet/textdlg.cpp
index 0810eb2..34cec29 100644
--- a/noncore/apps/opie-sheet/textdlg.cpp
+++ b/noncore/apps/opie-sheet/textdlg.cpp
@@ -14,7 +14,7 @@
#include "textdlg.h"
-TextDialog::TextDialog(QWidget *parent=0)
+TextDialog::TextDialog(QWidget *parent)
:QDialog(parent, 0, TRUE)
{
edit=new QLineEdit(this);
@@ -31,7 +31,8 @@ TextDialog::~TextDialog()
{
}
-int TextDialog::exec(const QString &caption, const QString &text, const QString &value="")
+int TextDialog::exec(const QString &caption, const QString &text,
+ const QString &value)
{
setCaption(caption);
label->setText(text);
diff --git a/noncore/tools/remote/helptab.cpp b/noncore/tools/remote/helptab.cpp
index 3c53ab6..ac51e13 100644
--- a/noncore/tools/remote/helptab.cpp
+++ b/noncore/tools/remote/helptab.cpp
@@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "helptab.h"
-HelpTab::HelpTab(QWidget *parent=0, const char *name=0):QWidget(parent, name)
+HelpTab::HelpTab(QWidget *parent, const char *name):QWidget(parent, name)
{
QVBoxLayout *layout = new QVBoxLayout(this);
QString *string = new QString("<qt><h1>Opie-Remote Usage Instructions</h1><p>First, some definitions. A Remote is a remote entry in an lircd.conf file, it represents one remote you want to emulate. A Remote Layout is one entry in your ~/Settings/Remote.conf file. It represents the buttons that you see on your screen. Each button on a Remote Layout can be mapped to any button in a Remote. This way you can have, for example, a vcr remote layout, in which all the play/pause/etc buttons are mapped to the buttons on your vcr's remote. However, most VCR's don't have volume controls, so the volume buttons can be mapped to the volume buttons on your TV.</p><p>The first things you need the lirc and lirc-modules ipkgs. If you installed this from an ipkg, they should already be there, thanks to the wonderful world of dependencies. If not, get them. The next thing you need is an lircd.conf file. you can get these at <a href=http://www.lirc.org/>http://www.lirc.org/</a>. Read the documentation there to figure out how to make your own, if one for your remote doesn't exist, or how to have multiple remotes in one lircd.conf file. Once you have a good lircd.conf file, put it in /etc, kill the lircd daemon (if its running) and do a modprobe lirc_sir. Then, run lircd again.</p><p>The next thing you want to do is to create a remote layout. Go to the config tab, and enter a name for your remote layout in the pulldown menu. Dont use the name Remotes, as that could confuse the app. Hopefully, that will be fixed soon. after entering the name you want to use, press New, and then select the name again from the pulldown menu (another oddity that i hope to fix). Then, press each button that you want to map, and a dialog should appear. Select the remote and button that you want to use, and click OK. Once you are done, go to the Remote tab, and select the new remote from the dropdown menu. It should works fine. If at any time you want to change a remote layout, go to the Config tab, select the layout from the dropdown menu, and change the buttons you want to change.</p><p>This is program is written and maintaned by Thomas (spiralman) Stephens. <a href=mailto:spiralman@softhome.net>spiralman@softhome.net</a>. Or, look for me on #opie or #handhelds.org on irc.openprojects.net.</p></qt>");
diff --git a/noncore/tools/remote/helptab.h b/noncore/tools/remote/helptab.h
index f3f99b3..83f24ef 100644
--- a/noncore/tools/remote/helptab.h
+++ b/noncore/tools/remote/helptab.h
@@ -14,6 +14,9 @@ You should have received a copy of the GNU General Public License along with thi
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef HELP_TAB_H
+#define HELP_TAB_H
+
#include <qwidget.h>
#include <qtextview.h>
#include <qstring.h>
@@ -23,4 +26,6 @@ class HelpTab : public QWidget
{
public:
HelpTab(QWidget *parent=0, const char *name=0);
-}; \ No newline at end of file
+};
+
+#endif
diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp
index f7cd30c..cfab730 100644
--- a/noncore/tools/remote/recorddialog.cpp
+++ b/noncore/tools/remote/recorddialog.cpp
@@ -16,11 +16,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "recorddialog.h"
-RecordDialog::RecordDialog(QWidget *parent=0, const char *name=0):QDialog(parent, name)
+RecordDialog::RecordDialog(QWidget *parent, const char *name)
+ :QDialog(parent, name)
{
QVBoxLayout *layout = new QVBoxLayout(this);
QHBoxLayout *hlayout = new QHBoxLayout(this);
-
+
layout->insertSpacing(0,5);
output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output");
layout->insertWidget(-1, output);
@@ -32,13 +33,13 @@ RecordDialog::RecordDialog(QWidget *parent=0, const char *name=0):QDialog(parent
input = new QLineEdit(this, "input");
hlayout->insertWidget(-1, input, 1);
hlayout->insertSpacing(-1, 5);
-
+
QPushButton *ret = new QPushButton("Return", this, "return");
hlayout->insertWidget(-1, ret);
hlayout->insertSpacing(-1, 5);
connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) );
where = 0;
-
+
record = new OProcess;
}
diff --git a/noncore/tools/remote/recorddialog.h b/noncore/tools/remote/recorddialog.h
index 38b2bb4..e4dcae6 100644
--- a/noncore/tools/remote/recorddialog.h
+++ b/noncore/tools/remote/recorddialog.h
@@ -14,6 +14,9 @@ You should have received a copy of the GNU General Public License along with thi
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef RecordDialog_H
+#define RecordDialog_H
+
#include <qdialog.h>
#include <qtextview.h>
#include <qlineedit.h>
@@ -40,4 +43,7 @@ private:
QLineEdit *input;
OProcess *record;
int where;
-}; \ No newline at end of file
+};
+
+#endif
+