diff --git a/CHANGES b/CHANGES index 9ed2f07..0e77c05 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +2004-05-06 JMB Mac OS X support + + Lots of little code tweaks to make PortaBase work properly and look + reasonably native on Mac OS X. Also added the files needed to generate + an application bundle. This is the code that was submitted to + Trolltech's Qt/Mac application developer contest. + 2004-03-29 #################### PortaBase 1.9 #################### 2004-03-29 JMB Translation updates, minor row viewer fix, etc. diff --git a/INSTALL b/INSTALL index 8043fa2..cfaf2fe 100644 --- a/INSTALL +++ b/INSTALL @@ -26,6 +26,15 @@ will need the following: - A recent version of Qt 3 (including qmake and development headers) - Other packages as needed to satisfy the above requirements or create packages for your OS/distribution + +Mac OS X Development Environment +-------------------------------- +To compile PortaBase for use as a Mac OS X desktop application, you will +need the following: +- Mac OS X Jaguar (10.2) or higher +- The Apple developer tools (which are on one of the CDs that come with + Panther, and are available from http://developer.apple.com) +- A recent version of Qt 3 Metakit Compilation ------------------- @@ -33,7 +42,10 @@ To compile PortaBase, Metakit must be compiled first. PortaBase uses a version of 2.4.9.3 patched to allow case-sensitive searches, locale-sensitive sorting, and unicode filename support where available. Therefore, the patch file metakit-2.4.9.3.patch must be applied to the Metakit 2.4.9.3 source tree -before building. +before building. When building for Mac OS X, however, a more recent version +from CVS is necessary in order to avoid a build problem present in the older +code; for the Qt/Mac developer contest, an already-patched Metakit source +code tarball (metakit.tar.gz) has been included for convenience. To build Metakit for the desktop test environment, run dev-x86-qpe.sh and then follow the Metakit installation instructions (in the Metakit README file). @@ -56,7 +68,8 @@ placed in (probably not /usr/local this time). Then copy libmk4.a to To compile Metakit for Windows, follow the instructions in Metakit's README file; be sure to build the static library version (mklib). To compile -Metakit for use in Linux desktop PortaBase, just follow the README directions. +Metakit for use in Linux or Mac OS X desktop PortaBase, just follow the +README directions (the "UNIX" instructions in both cases). BeeCrypt compilation -------------------- @@ -73,10 +86,11 @@ libjpeg compilation ------------------- For desktop Linux, this is probably already on your system; just make sure to install the appropriate dev package if it hasn't already been installed (for -Debian this is libjpeg62-dev). For Windows, get version 6b from +Debian this is libjpeg62-dev). For Windows and Mac OS X, get version 6b from http://www.ijg.org and follow the build instructions from the install.doc file -that comes with the source code. For the Zaurus version, it's easiest to just -use the Debian arm package for libjpeg62-dev; after downloading the .deb file, +that comes with the source code (at least on Mac OS X, remember to run "make +install-lib" at the end). For the Zaurus version, it's easiest to just use +the Debian arm package for libjpeg62-dev; after downloading the .deb file, you can extract the necessary files by running: ar x libjpeg62-dev_6b-9_arm.deb @@ -172,6 +186,26 @@ files into the correct locations: ...and so on. (The portabase.qm files are created by running lrelease on portabase.pro.) +Mac OS X compilation +-------------------- +- Install Qt version 3.2 or newer and configure it, as per the directions + in its INSTALL file. Newer versions are better, as this port is + relatively new and many bugs have been fixed recently. +- Make sure the BeeCrypt and libjpeg static libraries (.a) are in + /usr/local/lib, and that the other library files (.dylib, .la, etc.) + aren't. Run ranlib on both of these files, e.g. + "sudo ranlib /usr/local/lib/libjpeg.a". The Metakit shared library + file (libmk4.dylib) should be here also. +- Make sure that "desktop" is among the CONFIG parameters in portabase.pro + (and that "qtopia", "sharp", and "test" aren't). +- Run qmake on portabase.pro +- Run make +- Enter the "mac" subdirectory and run "./build_bundle.sh". This will + create the PortaBase application bundle in that directory (copying and + appropriately linking the PortaBase executable and the Metakit shared + library file in the process). You can now run it and move it wherever + you'd like. + Package Building ---------------- To create ".ipk" files for installation on the Zaurus, create the following @@ -185,6 +219,7 @@ directory hierarchy as root in a directory of your choice: /portabase/opt/QtPalmtop/help/ja/html/portabase.html /portabase/opt/QtPalmtop/help/zh_TW/html/portabase.html /portabase/opt/QtPalmtop/i18n/cs/portabase.qm +/portabase/opt/QtPalmtop/i18n/de/portabase.qm /portabase/opt/QtPalmtop/i18n/fr/portabase.qm /portabase/opt/QtPalmtop/i18n/ja/portabase.qm /portabase/opt/QtPalmtop/i18n/zh_TW/portabase.qm diff --git a/README.txt b/README.txt index d8bca61..82c22a4 100644 --- a/README.txt +++ b/README.txt @@ -3,7 +3,7 @@ PortaBase 1.9 (March 2004) PortaBase (portable database) is a personal database application originally written for the Linux-based models of Sharp Zaurus PDA (and should work on any other Linux PDA using the Qtopia environment.) It can now also be -run as a Linux or Windows desktop application. +run as a Linux, Mac OS X, or Windows desktop application. The main features PortaBase currently has are: - One data table per file @@ -54,6 +54,11 @@ Windows Installation and Upgrades Run the downloaded executable; it will launch the installation program, just follow the directions. +Mac OS X Installation +--------------------- +Extract the application bundle from the downloaded archive and put it where +you want it. + Technical Info and Acknowledgements ----------------------------------- PortaBase is written in C++, using the Qt and Qtopia libraries for GUI widgets, diff --git a/calculator.cpp b/calculator.cpp index f15ae52..7254df4 100644 --- a/calculator.cpp +++ b/calculator.cpp @@ -71,12 +71,14 @@ Calculator::Calculator(QWidget* parent, const char *name) buttons[PLUSMINUS] = new QPushButton("+-", this); buttons[PERCENT] = new QPushButton("%", this); - int buttonWidth = 30; int i; +#if !defined(Q_OS_MACX) + int buttonWidth = 30; for (i = 0; i < MAX_BUTTONS; i++) { buttons[i]->setMinimumWidth(buttonWidth); buttons[i]->setMaximumWidth(buttonWidth); } +#endif grid->addWidget(buttons[7], 1, 0); grid->addWidget(buttons[8], 1, 1); diff --git a/datewidget.cpp b/datewidget.cpp index 3d0d05c..36b689e 100644 --- a/datewidget.cpp +++ b/datewidget.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include "database.h" #include "datewidget.h" @@ -50,7 +51,11 @@ DateWidget::DateWidget(QWidget *parent, const char *name, WFlags f) months.append(tr("Nov")); months.append(tr("Dec")); dateObj = QDate::currentDate(); +#if defined(Q_OS_MACX) + QToolButton *button = new QToolButton(this); +#else QPushButton *button = new QPushButton(this); +#endif button->setPixmap(Resource::loadPixmap("portabase/calendar")); connect(button, SIGNAL(clicked()), this, SLOT(launchSelector())); display = new QLabel(toString(dateObj), this); diff --git a/desktop/QtaDatePicker.cpp b/desktop/QtaDatePicker.cpp index dddb210..76b2e09 100644 --- a/desktop/QtaDatePicker.cpp +++ b/desktop/QtaDatePicker.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include // // Globals @@ -48,9 +49,13 @@ QDatePicker::QDatePicker(QDate *inDate, QWidget *parent) vbox->addWidget(hbox); // Create the 'prev' month button +#if defined(Q_OS_MACX) + QToolButton *prevMonthButton = new QToolButton(Qt::LeftArrow, hbox); +#else QPushButton *prevMonthButton = new QPushButton(hbox); QPixmap prevPixmap = Resource::loadPixmap("portabase/QtaDatePickerPrev"); prevMonthButton->setPixmap(prevPixmap); +#endif connect(prevMonthButton, SIGNAL(clicked()), this, SLOT(datePickerPrevMonth())); @@ -74,9 +79,13 @@ QDatePicker::QDatePicker(QDate *inDate, QWidget *parent) this, SLOT(datePickerMonthChanged(int))); // Create the 'next' month button +#if defined(Q_OS_MACX) + QToolButton *nextMonthButton = new QToolButton(Qt::RightArrow, hbox); +#else QPushButton *nextMonthButton = new QPushButton(hbox); QPixmap nextPixmap = Resource::loadPixmap("portabase/QtaDatePickerNext"); nextMonthButton->setPixmap(nextPixmap); +#endif connect(nextMonthButton, SIGNAL(clicked()), this, SLOT(datePickerNextMonth())); diff --git a/desktop/qpeapplication.cpp b/desktop/qpeapplication.cpp index e2b8be8..f72fb79 100644 --- a/desktop/qpeapplication.cpp +++ b/desktop/qpeapplication.cpp @@ -40,9 +40,13 @@ QString QPEApplication::iconDir() { #if defined(Q_WS_WIN) return qApp->applicationDirPath() + "/icons/"; +#else +#if defined(Q_OS_MACX) + return QPEApplication::resourcePath() + "icons/"; #else return "/usr/share/portabase/icons/"; #endif +#endif } QString QPEApplication::documentDir() @@ -83,16 +87,21 @@ QStringList QPEApplication::languageList() QString QPEApplication::translationFile() { QStringList langs = QPEApplication::languageList(); + QString suffix = "/portabase.qm"; #if defined(Q_WS_WIN) QString path = qApp->applicationDirPath() + "/i18n/"; +#else +#if defined(Q_OS_MACX) + QString path = QPEApplication::resourcePath(); + suffix = ".lproj/portabase.qm"; #else QString path = "/usr/share/portabase/i18n/"; #endif - QString filename = "/portabase.qm"; +#endif int count = langs.count(); for (int i = 0; i < count; i++) { - if (QFile::exists(path + langs[i] + filename)) { - return path + langs[i] + filename; + if (QFile::exists(path + langs[i] + suffix)) { + return path + langs[i] + suffix; } } // No appropriate translation file, just use what's in the code @@ -102,20 +111,26 @@ QString QPEApplication::translationFile() QString QPEApplication::helpDir() { QStringList langs = QPEApplication::languageList(); + QString suffix = "/"; #if defined(Q_WS_WIN) QString path = qApp->applicationDirPath() + "/help/"; +#else +#if defined(Q_OS_MACX) + QString path = QPEApplication::resourcePath(); + suffix = ".lproj/"; #else QString path = "/usr/share/portabase/help/"; +#endif #endif int count = langs.count(); for (int i = 0; i < count; i++) { QDir dir(path + langs[i]); if (dir.exists()) { - return path + langs[i] + "/"; + return path + langs[i] + suffix; } } // Default to English, will usually be present - return path + "en/"; + return path + "en" + suffix; } void QPEApplication::showMainDocumentWidget(QWidget* mw, bool nomaximize) @@ -127,3 +142,10 @@ void QPEApplication::showMainDocumentWidget(QWidget* mw, bool nomaximize) mw->show(); } } + +#if defined(Q_OS_MACX) +QString QPEApplication::resourcePath() +{ + return qApp->applicationDirPath() + "/../Resources/"; +} +#endif diff --git a/desktop/qpeapplication.h b/desktop/qpeapplication.h index ccd71e2..d46dcbb 100644 --- a/desktop/qpeapplication.h +++ b/desktop/qpeapplication.h @@ -1,7 +1,7 @@ /* * qpeapplication.h * - * (c) 2003 by Jeremy Bowman + * (c) 2003-2004 by Jeremy Bowman * * 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 @@ -31,6 +31,9 @@ class QPEApplication : public QApplication private: static QStringList languageList(); +#if defined(Q_OS_MACX) + static QString resourcePath(); +#endif }; #endif diff --git a/filtereditor.cpp b/filtereditor.cpp index d846958..3b037ef 100644 --- a/filtereditor.cpp +++ b/filtereditor.cpp @@ -25,7 +25,7 @@ FilterEditor::FilterEditor(QWidget *parent, const char *name) { QHBox *hbox = new QHBox(this); vbox->addWidget(hbox); - new QLabel(tr("Filter Name"), hbox); + new QLabel(tr("Filter Name") + " ", hbox); nameBox = new QLineEdit(hbox); listBox = new QListBox(this); diff --git a/mac/Info.plist b/mac/Info.plist new file mode 100755 index 0000000..caececd --- /dev/null +++ b/mac/Info.plist @@ -0,0 +1,45 @@ + + + + + CFAppleHelpAnchor + portabase + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + pob + + CFBundleTypeIconFile + PortaBaseFile + CFBundleTypeName + PortaBase File + CFBundleTypeRole + Editor + + + CFBundleExecutable + PortaBase + CFBundleGetInfoString + 1.9, (c) Jeremy Bowman, 2002-2004 + CFBundleIconFile + PortaBase + CFBundleIdentifier + net.sourceforge.portabase + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.9 + CFBundleSignature + PBas + CFBundleVersion + 1.9 + LSMinimumSystemVersion + 10.2.0 + + diff --git a/mac/PkgInfo b/mac/PkgInfo new file mode 100755 index 0000000..7b9ef41 --- /dev/null +++ b/mac/PkgInfo @@ -0,0 +1 @@ +APPLPBas diff --git a/mac/PortaBase.icns b/mac/PortaBase.icns new file mode 100755 index 0000000..9e60f8a Binary files /dev/null and b/mac/PortaBase.icns differ diff --git a/mac/PortaBaseFile.icns b/mac/PortaBaseFile.icns new file mode 100755 index 0000000..4b56bdc Binary files /dev/null and b/mac/PortaBaseFile.icns differ diff --git a/mac/build_bundle.sh b/mac/build_bundle.sh new file mode 100755 index 0000000..b558c96 --- /dev/null +++ b/mac/build_bundle.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# +# Build the application bundle for Mac OS X, after the executable has been +# compiled. + +# Basic directory structure +mkdir PortaBase.app +mkdir PortaBase.app/Contents +mkdir PortaBase.app/Contents/MacOS +mkdir PortaBase.app/Contents/Frameworks +mkdir PortaBase.app/Contents/Resources + +# Metadata files +cp Info.plist PortaBase.app/Contents/ +cp PkgInfo PortaBase.app/Contents/ + +# Metakit shared library +cp /usr/local/lib/libmk4.dylib PortaBase.app/Contents/Frameworks/ +install_name_tool -id @executable_path/../Frameworks/libmk4.dylib \ + PortaBase.app/Contents/Frameworks/libmk4.dylib + +# Executable +cp ../portabase.app/Contents/MacOS/portabase PortaBase.app/Contents/MacOS/ +install_name_tool -change libmk4.dylib \ + @executable_path/../Frameworks/libmk4.dylib \ + PortaBase.app/Contents/MacOS/PortaBase + +# Icons +cp PortaBase.icns PortaBase.app/Contents/Resources/ +cp PortaBaseFile.icns PortaBase.app/Contents/Resources/ +mkdir PortaBase.app/Contents/Resources/icons +cp icons/*.png PortaBase.app/Contents/Resources/icons/ +mkdir PortaBase.app/Contents/Resources/icons/portabase +cp icons/portabase/*.png PortaBase.app/Contents/Resources/icons/portabase/ +cp icons/portabase/*.xpm PortaBase.app/Contents/Resources/icons/portabase/ + +# Help file (and translations thereof...use English when not translated) +mkdir PortaBase.app/Contents/Resources/cs.lproj +cp ../help/html/portabase.html PortaBase.app/Contents/Resources/cs.lproj/ +mkdir PortaBase.app/Contents/Resources/de.lproj +cp ../help/html/portabase.html PortaBase.app/Contents/Resources/de.lproj/ +mkdir PortaBase.app/Contents/Resources/en.lproj +cp ../help/html/portabase.html PortaBase.app/Contents/Resources/en.lproj/ +mkdir PortaBase.app/Contents/Resources/fr.lproj +cp ../help/html/portabase.html PortaBase.app/Contents/Resources/fr.lproj/ +mkdir PortaBase.app/Contents/Resources/ja.lproj +cp ../help/ja/html/portabase.html PortaBase.app/Contents/Resources/ja.lproj/ +mkdir PortaBase.app/Contents/Resources/zh_TW.lproj +cp ../help/tw/html/portabase.html PortaBase.app/Contents/Resources/zh_TW.lproj/ + +# UI translation files +cd .. +lrelease portabase.pro +cd mac +cp ../portabase_cs.qm PortaBase.app/Contents/Resources/cs.lproj/ +cp ../portabase_de.qm PortaBase.app/Contents/Resources/de.lproj/ +cp ../portabase_fr.qm PortaBase.app/Contents/Resources/fr.lproj/ +cp ../portabase_ja.qm PortaBase.app/Contents/Resources/ja.lproj/ +cp ../portabase_zh_TW.qm PortaBase.app/Contents/Resources/zh_TW.lproj/ diff --git a/mac/eventhandlers.h b/mac/eventhandlers.h new file mode 100755 index 0000000..b441838 --- /dev/null +++ b/mac/eventhandlers.h @@ -0,0 +1,77 @@ +/* + * mac/eventhandlers.h + * + * (c) 2004 by Jeremy Bowman + * + * 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. + */ + +#include + +#if defined(Q_OS_MACX) +#include "../portabase.h" +#include +#include + +static PortaBase *pbInstance = 0; + +static OSErr checkAppleEventForMissingParams(const AppleEvent& theAppleEvent) +{ + DescType returnedType; + Size actualSize; + OSErr err; + + switch (err = AEGetAttributePtr(&theAppleEvent, keyMissedKeywordAttr, + typeWildCard, &returnedType, nil, 0, + &actualSize)) { + case errAEDescNotFound: // If we couldn't find the error attribute + return noErr; // everything is ok, return noErr + case noErr: // We found an error attribute, so + return errAEEventNotHandled; // tell the client we ignored the event + default: + return err; // Something else happened, return it + } +} + +static pascal OSErr odocHandler(const AppleEvent* inEvent, AppleEvent*, long) +{ + AEDescList documentList; + OSErr err = AEGetParamDesc(inEvent, keyDirectObject, typeAEList, + &documentList); + if (err == noErr) { + err = checkAppleEventForMissingParams(*inEvent); + if (err == noErr) { + long documentCount; + err = AECountItems(&documentList, &documentCount); + if (err == noErr && documentCount > 0) { + // What kind of document is it? + long documentIndex = 1; + DescType returnedType; + Size actualSize; + err = AESizeOfNthItem(&documentList, documentIndex, + &returnedType, &actualSize); + if (err == noErr) { + // It's just a normal document file + AEKeyword keyword; + FSRef ref; + err = AEGetNthPtr(&documentList, documentIndex, typeFSRef, + &keyword, &returnedType, (Ptr)&ref, + sizeof(FSRef), &actualSize); + if (err == noErr) { + char buf[1024]; + FSRefMakePath(&ref, reinterpret_cast(buf), 1024); + if (pbInstance) { + pbInstance->openFile(QString::fromUtf8(buf)); + } + } + } + } + } + AEDisposeDesc(&documentList); + } + return err; +} +#endif \ No newline at end of file diff --git a/mac/icons/back.png b/mac/icons/back.png new file mode 100755 index 0000000..52c9c35 Binary files /dev/null and b/mac/icons/back.png differ diff --git a/mac/icons/calculator.png b/mac/icons/calculator.png new file mode 100755 index 0000000..b7077f1 Binary files /dev/null and b/mac/icons/calculator.png differ diff --git a/mac/icons/close.png b/mac/icons/close.png new file mode 100755 index 0000000..87faccb Binary files /dev/null and b/mac/icons/close.png differ diff --git a/mac/icons/copy.png b/mac/icons/copy.png new file mode 100755 index 0000000..cfa9cb4 Binary files /dev/null and b/mac/icons/copy.png differ diff --git a/mac/icons/edit.png b/mac/icons/edit.png new file mode 100755 index 0000000..1d69145 Binary files /dev/null and b/mac/icons/edit.png differ diff --git a/mac/icons/fileopen.png b/mac/icons/fileopen.png new file mode 100755 index 0000000..503a004 Binary files /dev/null and b/mac/icons/fileopen.png differ diff --git a/mac/icons/find.png b/mac/icons/find.png new file mode 100755 index 0000000..f507381 Binary files /dev/null and b/mac/icons/find.png differ diff --git a/mac/icons/forward.png b/mac/icons/forward.png new file mode 100755 index 0000000..c55c3b8 Binary files /dev/null and b/mac/icons/forward.png differ diff --git a/mac/icons/new.png b/mac/icons/new.png new file mode 100755 index 0000000..8a303b7 Binary files /dev/null and b/mac/icons/new.png differ diff --git a/mac/icons/portabase.png b/mac/icons/portabase.png new file mode 100755 index 0000000..82710b1 Binary files /dev/null and b/mac/icons/portabase.png differ diff --git a/mac/icons/portabase/calculator.png b/mac/icons/portabase/calculator.png new file mode 100755 index 0000000..b7077f1 Binary files /dev/null and b/mac/icons/portabase/calculator.png differ diff --git a/mac/icons/portabase/calendar.xpm b/mac/icons/portabase/calendar.xpm new file mode 100755 index 0000000..1e6c7fd --- /dev/null +++ b/mac/icons/portabase/calendar.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *calendar[]={ +"20 20 3 1", +"# c #00ffff", +". c #303030", +"a c #ffffff", +"....................", +".#################..", +".#################..", +".#################..", +"....................", +".aa.aa.aa.aa.aa.aa..", +".aa.aa.aa.aa.aa.aa..", +"....................", +".aa.aa.aa.aa.aa.aa..", +".aa.aa.aa.aa.aa.aa..", +"....................", +".aa.aa.aa.aa.aa.aa..", +".aa.aa.aa.aa.aa.aa..", +"....................", +".aa.aa.aa.aa.aa.aa..", +".aa.aa.aa.aa.aa.aa..", +"....................", +".aa.aa.aa.aa.aa.aa..", +".aa.aa.aa.aa.aa.aa..", +"...................."}; diff --git a/mac/icons/portabase/checked.png b/mac/icons/portabase/checked.png new file mode 100755 index 0000000..6841e0c Binary files /dev/null and b/mac/icons/portabase/checked.png differ diff --git a/mac/icons/portabase/down.png b/mac/icons/portabase/down.png new file mode 100755 index 0000000..ce66f8d Binary files /dev/null and b/mac/icons/portabase/down.png differ diff --git a/mac/icons/portabase/image.png b/mac/icons/portabase/image.png new file mode 100755 index 0000000..bc56a1c Binary files /dev/null and b/mac/icons/portabase/image.png differ diff --git a/mac/icons/portabase/note.png b/mac/icons/portabase/note.png new file mode 100755 index 0000000..df767b7 Binary files /dev/null and b/mac/icons/portabase/note.png differ diff --git a/mac/icons/portabase/save.png b/mac/icons/portabase/save.png new file mode 100755 index 0000000..dd00abd Binary files /dev/null and b/mac/icons/portabase/save.png differ diff --git a/mac/icons/portabase/unchecked.png b/mac/icons/portabase/unchecked.png new file mode 100755 index 0000000..429d0ae Binary files /dev/null and b/mac/icons/portabase/unchecked.png differ diff --git a/mac/icons/portabase/up.png b/mac/icons/portabase/up.png new file mode 100755 index 0000000..dbad6ea Binary files /dev/null and b/mac/icons/portabase/up.png differ diff --git a/mac/icons/quit_icon.png b/mac/icons/quit_icon.png new file mode 100755 index 0000000..f83a66d Binary files /dev/null and b/mac/icons/quit_icon.png differ diff --git a/mac/icons/trash.png b/mac/icons/trash.png new file mode 100755 index 0000000..945d221 Binary files /dev/null and b/mac/icons/trash.png differ diff --git a/mac/icons/txt.png b/mac/icons/txt.png new file mode 100755 index 0000000..ce76c05 Binary files /dev/null and b/mac/icons/txt.png differ diff --git a/main.cpp b/main.cpp index d06dafb..d7c942b 100644 --- a/main.cpp +++ b/main.cpp @@ -18,6 +18,10 @@ #include "desktop/qpeapplication.h" #endif +#if defined(Q_OS_MACX) +#include "mac/eventhandlers.h" +#endif + int main(int argc, char **argv) { QPEApplication app(argc, argv); if (argc > 1 && argv[1] != QCString("-f") @@ -32,6 +36,12 @@ int main(int argc, char **argv) { if (argc == 3 && argv[1] == QCString("-f")) { pb.openFile(argv[2]); } +#if defined(Q_OS_MACX) + pbInstance = &pb; + // need this in order to open files launched from Finder + AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, + NewAEEventHandlerUPP(odocHandler), 0, false); +#endif return app.exec(); } } diff --git a/menuactions.cpp b/menuactions.cpp index 7c6648e..f958cc3 100644 --- a/menuactions.cpp +++ b/menuactions.cpp @@ -23,25 +23,29 @@ MenuActions::MenuActions(QObject *parent, const char *name) textMap.insert("Sort", tr("Sort")); textMap.insert("Filter", tr("Filter")); textMap.insert("Help", tr("Help")); - textMap.insert("New", tr("New")); - textMap.insert("Open", tr("Open")); + textMap.insert("New", tr("New") + "..."); + textMap.insert("Open", tr("Open") + "..."); textMap.insert("Open Recent", tr("Open Recent")); textMap.insert("Save", tr("Save")); - textMap.insert("Change Password", tr("Change Password")); + textMap.insert("Change Password", tr("Change Password") + "..."); textMap.insert("Import", tr("Import") + "..."); textMap.insert("Export", tr("Export") + "..."); textMap.insert("Slideshow", tr("Slideshow") + "..."); - textMap.insert("Properties", tr("Properties")); - textMap.insert("Preferences", tr("Preferences")); + textMap.insert("Properties", tr("Properties") + "..."); + textMap.insert("Preferences", tr("Preferences") + "..."); textMap.insert("Quit", tr("Quit")); textMap.insert("List", tr("List")); textMap.insert("Icons", tr("Icons")); +#if defined(Q_OS_MACX) + textMap.insert("Help Contents", tr("PortaBase Help")); +#else textMap.insert("Help Contents", tr("Help Contents")); +#endif textMap.insert("About PortaBase", tr("About PortaBase")); textMap.insert("About Qt", tr("About Qt")); - textMap.insert("Quick Filter", tr("Quick Filter")); - textMap.insert("Add", tr("Add")); - textMap.insert("Edit", tr("Edit")); + textMap.insert("Quick Filter", tr("Quick Filter") + "..."); + textMap.insert("Add", tr("Add") + "..."); + textMap.insert("Edit", tr("Edit") + "..."); textMap.insert("Delete", tr("Delete")); textMap.insert("Delete File", tr("Delete") + "..."); textMap.insert("Rename", tr("Rename") + "..."); @@ -49,10 +53,10 @@ MenuActions::MenuActions(QObject *parent, const char *name) textMap.insert("All Columns", tr("All Columns")); textMap.insert("All Rows", tr("All Rows")); textMap.insert("Copy", tr("Copy") + "..."); - textMap.insert("Show", tr("Show")); + textMap.insert("Show", tr("Show") + "..."); textMap.insert("Delete Rows In Filter", tr("Delete Rows In Filter")); - textMap.insert("Edit Columns", tr("Edit Columns")); - textMap.insert("Edit Enums", tr("Edit Enums")); + textMap.insert("Edit Columns", tr("Edit Columns") + "..."); + textMap.insert("Edit Enums", tr("Edit Enums") + "..."); textMap.insert("Close", tr("Close")); #if !defined(Q_WS_QWS) menuTextMap.insert("File", tr("&File")); @@ -61,34 +65,42 @@ MenuActions::MenuActions(QObject *parent, const char *name) menuTextMap.insert("Sort", tr("&Sort")); menuTextMap.insert("Filter", tr("Fi<er")); menuTextMap.insert("Help", tr("&Help")); - menuTextMap.insert("New", tr("&New")); - menuTextMap.insert("Open", tr("&Open")); + menuTextMap.insert("New", tr("&New") + "..."); + menuTextMap.insert("Open", tr("&Open") + "..."); menuTextMap.insert("Open Recent", tr("Open &Recent")); menuTextMap.insert("Save", tr("&Save")); - menuTextMap.insert("Change Password", tr("C&hange Password")); + menuTextMap.insert("Change Password", tr("C&hange Password") + "..."); menuTextMap.insert("Import", tr("&Import") + "..."); menuTextMap.insert("Export", tr("E&xport") + "..."); menuTextMap.insert("Slideshow", tr("S&lideshow") + "..."); - menuTextMap.insert("Properties", tr("Proper&ties")); - menuTextMap.insert("Preferences", tr("&Preferences")); + menuTextMap.insert("Properties", tr("Proper&ties") + "..."); + menuTextMap.insert("Preferences", tr("&Preferences") + "..."); menuTextMap.insert("Quit", tr("&Quit")); +#if defined(Q_OS_MACX) + menuTextMap.insert("Help Contents", tr("PortaBase Help")); +#else menuTextMap.insert("Help Contents", tr("Help &Contents")); +#endif menuTextMap.insert("About PortaBase", tr("&About PortaBase")); menuTextMap.insert("About Qt", tr("About &Qt")); - menuTextMap.insert("Quick Filter", tr("&Quick Filter")); - menuTextMap.insert("Add", tr("&Add")); - menuTextMap.insert("Edit", tr("&Edit")); + menuTextMap.insert("Quick Filter", tr("&Quick Filter") + "..."); + menuTextMap.insert("Add", tr("&Add") + "..."); + menuTextMap.insert("Edit", tr("&Edit") + "..."); menuTextMap.insert("Delete", tr("&Delete")); menuTextMap.insert("All Columns", tr("All &Columns")); menuTextMap.insert("All Rows", tr("All &Rows")); menuTextMap.insert("Copy", tr("&Copy") + "..."); - menuTextMap.insert("Show", tr("&Show")); + menuTextMap.insert("Show", tr("&Show") + "..."); menuTextMap.insert("Delete Rows In Filter", tr("&Delete Rows In Filter")); - menuTextMap.insert("Edit Columns", tr("Edit Col&umns")); - menuTextMap.insert("Edit Enums", tr("Edit &Enums")); + menuTextMap.insert("Edit Columns", tr("Edit Col&umns") + "..."); + menuTextMap.insert("Edit Enums", tr("Edit &Enums") + "..."); menuTextMap.insert("Close", tr("&Close")); +#if defined(Q_OS_MACX) + accelMap.insert("Help Contents", CTRL+Key_Question); +#else accelMap.insert("Help Contents", Key_F1); +#endif accelMap.insert("New", CTRL+Key_N); accelMap.insert("Open", CTRL+Key_O); accelMap.insert("Save", CTRL+Key_S); diff --git a/numberwidget.cpp b/numberwidget.cpp index 16499d8..695f6c0 100644 --- a/numberwidget.cpp +++ b/numberwidget.cpp @@ -11,6 +11,7 @@ #include #include +#include #include "calculator.h" #include "datatypes.h" #include "numberwidget.h" @@ -25,7 +26,11 @@ NumberWidget::NumberWidget(int type, QWidget *parent, const char *name, WFlags f : QHBox(parent, name, f), dataType(type) { entryField = new QLineEdit(this); +#if defined(Q_OS_MACX) + QToolButton *button = new QToolButton(this); +#else QPushButton *button = new QPushButton(this); +#endif button->setPixmap(Resource::loadPixmap("portabase/calculator")); connect(button, SIGNAL(clicked()), this, SLOT(launchCalculator())); int height = button->height(); diff --git a/portabase.cpp b/portabase.cpp index c956b97..7646e20 100644 --- a/portabase.cpp +++ b/portabase.cpp @@ -68,23 +68,25 @@ typedef QInputDialog InputDialog; PortaBase::PortaBase(QWidget *parent, const char *name, WFlags f) : QMainWindow(parent, name, f), db(0), doc(0), isEdited(FALSE), needsRefresh(FALSE) { -#if defined(Q_WS_QWS) +#if defined(Q_WS_QWS) || defined(Q_OS_MACX) setToolBarsMovable(FALSE); #endif - QFont currentFont = qApp->font(); - QString family = currentFont.family().lower(); - int size = currentFont.pointSize(); Config *conf = getPreferences(); conf->setGroup("General"); confirmDeletions = conf->readBoolEntry("ConfirmDeletions", TRUE); booleanToggle = conf->readBoolEntry("BooleanToggle"); bool pagedDisplay = conf->readBoolEntry("PagedDisplay", TRUE); +#if !defined(Q_OS_MACX) + QFont currentFont = qApp->font(); + QString family = currentFont.family().lower(); + int size = currentFont.pointSize(); conf->setGroup("Font"); family = conf->readEntry("Name", family); size = conf->readNumEntry("Size", size); QFont font(family, size); qApp->setFont(font); setFont(font); +#endif conf->setGroup("Colors"); QString color = conf->readEntry("EvenRows", "#FFFFFF"); @@ -104,8 +106,10 @@ PortaBase::PortaBase(QWidget *parent, const char *name, WFlags f) menu = menuBar(); toolbar = new QToolBar(this); addToolBar(toolbar, QMainWindow::Top, TRUE); - statusBar(); setIcon(Resource::loadPixmap("portabase")); +#if !defined(Q_OS_MACX) + statusBar(); +#endif #endif ma = new MenuActions(this); @@ -397,16 +401,18 @@ void PortaBase::editPreferences() Preferences prefs(this); if (prefs.exec()) { QFont font = prefs.applyChanges(); +#if !defined(Q_OS_MACX) setFont(font); viewer->updateButtonSizes(); file->setFont(font); +#endif if (doc) { showDataViewer(); rebuildViewMenu(); rebuildSortMenu(); rebuildFilterMenu(); } -#if !defined(Q_WS_QWS) +#if !defined(Q_WS_QWS) && !defined(Q_OS_MACX) help->setFont(font); fileSelector->setFont(font); #endif @@ -537,6 +543,9 @@ void PortaBase::openFile() void PortaBase::openFile(const QString &f) { + if (doc) { + return; + } DocLnk nf(f); openFile(nf); } @@ -740,7 +749,9 @@ void PortaBase::showFileSelector() #if !defined(Q_WS_QWS) help = new QPopupMenu(this); helpAction->addTo(help); +#if !defined(Q_OS_MACX) help->insertSeparator(); +#endif aboutAction->addTo(help); aboutQtAction->addTo(help); menu->insertItem(ma->menuText("Help"), help); @@ -839,7 +850,9 @@ void PortaBase::showDataViewer() #if !defined(Q_WS_QWS) help = new QPopupMenu(this); helpAction->addTo(help); +#if !defined(Q_OS_MACX) help->insertSeparator(); +#endif aboutAction->addTo(help); aboutQtAction->addTo(help); menu->insertItem(ma->menuText("Help"), help); diff --git a/portabase.pro b/portabase.pro index 83248d2..3b3af02 100644 --- a/portabase.pro +++ b/portabase.pro @@ -2,6 +2,7 @@ TEMPLATE = app CONFIG += qt warn_on release TARGET = portabase TRANSLATIONS = portabase_cs.ts \ + portabase_de.ts \ portabase_fr.ts \ portabase_ja.ts \ portabase_zh_TW.ts @@ -196,3 +197,8 @@ win32:QMAKE_CXXFLAGS_RELEASE += /MD win32:INCLUDEPATH += D:\Devel\metakit-2.4.9.3\include \ D:\Devel\jpeg-6b \ D:\Devel + +# Stuff for Mac OS X +macx:HEADERS += mac/eventhandlers.h +macx:LIBS += -framework ApplicationServices +macx:LIBS += -framework CoreServices diff --git a/portabase_de.ts b/portabase_de.ts new file mode 100644 index 0000000..12a5b88 --- /dev/null +++ b/portabase_de.ts @@ -0,0 +1,1920 @@ + + + CSVErrorDialog + + Problematic row + Problematische Zeile + + + + CalcDateEditor + + Calculation Node Editor + Berechnungsknoten bearbeiten + + + Column + Spalte + + + Constant + Konstante + + + + CalcEditor + + Calculation Editor + Berechnung bearbeiten + + + Column Name + Spaltenname + + + Equation + Gleichung + + + Decimal Places + Nachkommastellen + + + + CalcNode + + Days_Between + Tage_zwischen + + + MAX + MAX + + + MIN + MIN + + + AVERAGE + AVG + + + ABS + ABS + + + SQRT + SQRT + + + LOG + LOG + + + LN + LN + + + Seconds_Between + Sekunden_zwischen + + + Minutes_Between + Minuten_zwischen + + + Hours_Between + Stunden_zwischen + + + + CalcNodeEditor + + Calculation Node Editor + Berechnungsknoten bearbeiten + + + Column + Spalte + + + Constant + Konstante + + + Operation + Operation + + + Constant must be a decimal value + Konstante muss eine ganze Zahl sein + + + + CalcTimeEditor + + Calculation Node Editor + Berechnungsknoten bearbeiten + + + Column + Spalte + + + Constant + Konstante + + + + CalcWidget + + Update + Aktualisieren + + + + ColorDialog + + Hu&e: + Farb&ton : + + + &Sat: + &Sättigung : + + + &Val: + &Helligkeit : + + + &Red: + &Rot : + + + &Green: + &Grün : + + + Bl&ue: + Bla&u : + + + A&lpha channel: + A&lpha : + + + Select color + Farbe auswählen + + + + ColumnEditor + + Name + Name + + + Type + Typ + + + String + String + + + Integer + Integer + + + Decimal + Dezimal + + + Boolean + Boolean + + + Note + Notiz + + + Date + Datum + + + Time + Zeit + + + New Enum + Neue Aufzählung + + + Default + Vorgabe + + + Default Note + Vorgabenotiz + + + Today + Heute + + + None + kein + + + Now + Jetzt + + + Calculation + Berechnung + + + Sequence + Reihenfolge + + + Edit calculation + Berechnung bearbeiten + + + Next value + Nächster wert + + + Image + Bild + + + + Condition + + Any text column + Irgendeine Textspalte + + + %1 is checked + %1 ist gewählt + + + %1 is not checked + %1 ist nicht gewählt + + + %1 contains %2 + %1 enthält %2 + + + %1 starts with %2 + %1 beginnt mit %2 + + + + ConditionEditor + + Condition Editor + Bedingung bearbeiten + + + Any text column + Beliebige Stringspalte + + + contains + enthält + + + starts with + beginnt mit + + + Case sensitive + groß/klein beachten + + + Constant + Konstante + + + + Crypto + + Incorrect password + Ungültiges Kennwort + + + Error in decrypting data + Fehler in entschlüsselten Daten + + + Error in loading data + Fehler beim Laden der Daten + + + Password must be at least 6 characters long + Das Passwort muss mindestens 6 Zeichen lang sein + + + + DBEditor + + Columns Editor + Spalten Editor + + + + DateWidget + + None + kein + + + Mon + Mo + + + Tue + Di + + + Wed + Mi + + + Thu + Do + + + Fri + Fr + + + Sat + Sa + + + Sun + So + + + Jan + Jan + + + Feb + Feb + + + Mar + Mar + + + Apr + Apr + + + May + Mai + + + Jun + Jun + + + Jul + Jul + + + Aug + Aug + + + Sep + Sep + + + Oct + Okt + + + Nov + Nov + + + Dec + Dez + + + %1 %2 %3 %4 + 1=day of week, 2=month name, 3=day of month, 4=year + %1 %2 %3 %4 + +1=Wochentag, 2=Monat, 3=Tag des Monats, 4=Jahr + + + + EnumEditor + + Enum Editor + Aufzählung bearbeiten + + + Enum Name + Name der Aufzählung + + + Sort + Sortieren + + + Import + Import + + + Export + Export + + + Must have at least one option + Mindestens eine Option muss gewählt sein + + + Option text + Optionaler Text + + + Replace where used with: + Ersetzen wo benutzt mit: + + + + EnumManager + + Enum Manager + Aufzählungen bearbeiten + + + The following columns which +use this enum will also be +deleted: + Folgende Spalten, die +diese Aufzählung verwenden +werden gelöscht: + + + Continue? + Fortsetzen? + + + + FilterEditor + + Filter Editor + Filter bearbeiten + + + Filter Name + Name des Filters + + + + HelpBrowser + + Help + Hilfe + + + Back + Zurück + + + Forward + Vorwärts + + + + ImageEditor + + Image Editor + Bild bearbeiten + + + Width + Breite + + + Height + Höhe + + + Rotate + Drehung + + + Refresh + Aktualisieren + + + Image is too large to import + Das Bild ist zu groß für einen Import + + + Unsupported image format + Bildformat wird nicht unterstützt + + + + ImageSelector + + Select an image + Wählen Sie ein Bild + + + View + Ansicht + + + Change + Ändern + + + Delete + Löschen + + + Delete the current image? + Aktuelles Bild löschen? + + + + ImageViewer + + Image Viewer + Bildbetrachter + + + + ImportDialog + + Text encoding + Text-Codierung + + + Import rows from CSV file + Zeilen aus CSV-Datei importieren + + + Import from MobileDB file + Aus MobileDB importieren + + + Import from text file + Aus Text-Datei importieren + + + Import from XML file + Aus XML-Datei importieren + + + Text files with comma separated values + Text-Datei mit durch Komma getrennten Werten (CSV) + + + MobileDB files + MobileDB Dateien + + + XML files + XML Dateien + + + Images + Bilder + + + Choose a file + Wählen Sie eine Datei + + + Import + Importieren + + + Select an image + Wählen Sie ein Bild + + + + MenuActions + + File + Datei + + + View + Ansicht + + + Row + Zeile + + + Sort + Sortieren + + + Filter + Filter + + + Help + Hilfe + + + New + Neu + + + Open + Öffnen + + + Open Recent + Zuletzt geöffnete Dateien + + + Save + Speichern + + + Change Password + Passwort ändern + + + Import + Import + + + Export + Export + + + Slideshow + Diashow + + + Properties + Eigenschaften + + + Preferences + Einstellungen + + + Quit + Beenden + + + List + Liste + + + Icons + Icons + + + Help Contents + Hilfe Inhalt + + + About PortaBase + Über Portabase + + + About Qt + Über Qt + + + Quick Filter + Sofortfilter + + + Add + Hinzufügen + + + Edit + Bearbeiten + + + Delete + Löschen + + + Rename + Umbenennen + + + Refresh + Aktualisieren + + + All Columns + Alle Spalten + + + All Rows + Alle Zeilen + + + Copy + Kopieren + + + Show + Anzeigen + + + Delete Rows In Filter + Gefilterte Zeilen Löschen + + + Edit Columns + Spalten bearbeiten + + + Edit Enums + Aufzählung bearbeiten + + + Close + Schließen + + + &File + &Datei + + + &View + &Ansicht + + + &Row + &Zeile + + + &Sort + &Sortieren + + + Fi&lter + Fi&lter + + + &Help + &Hilfe + + + &New + &Neu + + + &Open + Ö&ffnen + + + Open &Recent + Zuletzt &Geöffnet + + + &Save + &Speichern + + + C&hange Password + &Passwort ändern + + + &Import + &Importieren + + + E&xport + E&xportieren + + + S&lideshow + Di&aporama + + + Proper&ties + E&igenschaften + + + &Preferences + &Einstellungen + + + &Quit + &Beenden + + + Help &Contents + Hilfe &Inhalt + + + &About PortaBase + Ü&ber PortaBase + + + About &Qt + Über &Qt + + + &Quick Filter + Sofort&filter + + + &Add + &Hinzufügen + + + &Edit + &Bearbeiten + + + &Delete + &Löschen + + + All &Columns + Alle &Spalten + + + All &Rows + Alle &Zeilen + + + &Copy + &Kopieren + + + &Show + &Anzeigen + + + &Delete Rows In Filter + &Gefilterte Zeilen Löschen + + + Edit &Enums + Aufzählungen &bearbeiten + + + &Close + &Schließen + + + Edit Col&umns + &Spalten bearbeiten + + + + NewFileDialog + + Export + Export + + + Enter a name for the new file + Geben Sie einen Namen für die neue Datei an + + + File already exists; overwrite it? + Datei existiert bereits, überschreiben? + + + Encrypt the file? + Datei verschlüsseln? + + + PortaBase files + PortaBase Dateien + + + Text files + Text Dateien + + + XML files + XML Dateien + + + Choose a filename to save under + Wählen Sie einen Namen zum speichern unter + + + Text files with comma separated values + Textdatei mit Komma-separierten Werten + + + Encrypted file + Verschlüsselte Datei + + + + PBDialog + + Name must not start with '_' + Der Name darf nicht mit '_' beginnen + + + Duplicate name + Doppelter Name + + + No name entered + Kein Name angegeben + + + OK + OK + + + Cancel + Abbrechen + + + Add + Hinzufügen + + + Edit + Bearbeiten + + + Delete + Löschen + + + Up + Nach oben + + + Down + Nach unten + + + + PBFileSelector + + No file selected + Keine Datei ausgewählt + + + PortaBase files + PortaBase Dateien + + + Choose a file + Wählen Sie eine Datei aus + + + Enter a name for the new file + Geben Sie einen Namen für die neue Datei an + + + Unable to create new file + Die neue Datei kann nicht angelegt werden + + + Enter the new file name + Geben Sie einen Namen für die neue Datei an + + + Unable to rename the file + Die Datei kann nicht umbenannt werden + + + + PasswordDialog + + Old password + Altes Passwort + + + New password + Neues Passswort + + + Password + Passwort + + + Repeat password + Passwort wiederholen + + + Repeat new password + Neues Passwort wiederholen + + + Repeated password doesn't match + Das wiederholte Passwort stimmt nicht überein + + + + PortaBase + + Delete + Löschen + + + XML + XML + + + MobileDB + MobileDB + + + Import from: + Importieren von: + + + Unable to create new file + Die neue Datei kann nicht angelegt werden + + + This file uses a newer version of the +PortaBase format than this version +of PortaBase supports; please +upgrade + Diese Datei nutzt eine neuere Version +des Portabase Formats als diese Version +unterstützt, bitte Version aktualisieren + + + Are you sure? + Sind Sie sicher? + + + Save changes? + Änderungen speichern? + + + Delete this row? + Zeile Löschen? + + + Delete all rows in the +current filter? + Alle Zeilen in diesem +Filter löschen? + + + CSV + CSV + + + rows in current filter + Zeilen in diesem Filter + + + Export to: + Exportieren nach: + + + Delete this view? + Diese Sicht löschen? + + + Delete this sorting? + Diese Sortierung löschen? + + + Delete this filter? + Diesen Filter löschen? + + + Copyright (C) + Copyright (C) + + + Web site at http://portabase.sourceforge.net + Homepage: http://portabase.sourceforge.net + + + Name + Name + + + Size + Größe + + + Rows + Zeilen + + + Columns + Spalten + + + Views + Sichten + + + Sortings + Sortierungen + + + Filters + Filter + + + Enums + Aufzählungen + + + File Properties + Eigenschaften Datei + + + File does not exist + Datei existiert nicht + + + Not a PortaBase file + Das ist keine Portabase-Datei + + + + Preferences + + Preferences + Einstellungen + + + Font + Schriftart + + + Name + Name + + + Size + Größe + + + Sample + Beispiel + + + Sample text + Beispiel Text + + + General + General + + + Confirm deletions + Löschen bestätigen + + + Allow checkbox edit in data viewer + Auswahlfelder in Datenansicht bearbeiten + + + Show seconds for times + Zeiten mit Sekunden anzeigen + + + Wrap Notes + Notizen umbrechen + + + at whitespace + an Leerzeichen + + + anywhere + überall + + + Row Colors + Zeilen einfärben + + + Date and Time + Datum und Zeit + + + Date format + Datumformat + + + Time format + Zeitformat + + + 24 hour + 24 Stunden + + + 12 hour + 12 Stunden + + + Weeks start on + Die Woche beginnt am + + + Sunday + Sonntag + + + Monday + Montag + + + Use pages in data viewer + Datenansicht in Seiten + + + Default rows per page + Vorgabe Zeilen pro Seite + + + Options + Optionen + + + Appearance + Darstellung + + + Top-level + Top level + + + Menu + Menü + + + Menus + Menüs + + + Show + Anzeigen + + + Toolbar Button + Werkzeugleiste + + + Buttons + Schaltflächen + + + + QColorDialog + + Hu&e: + Farb&ton : + + + &Sat: + &Sättigung : + + + &Val: + &Helligkeit : + + + &Red: + &Rot : + + + &Green: + &Grün : + + + Bl&ue: + Bla&u : + + + A&lpha channel: + A&lpha : + + + &Basic colors + &Grundfarben + + + &Custom colors + &Eigene Farben + + + &Define Custom Colors >> + Eigene &Farben einstellen >> + + + OK + OK + + + Cancel + Abbrechen + + + &Add to Custom Colors + &Als Eigene Farben hinzufügen + + + Select color + Farbe auswählen + + + + QDatePicker + + Select a date + Datum auswählen + + + January + Januar + + + February + Februar + + + March + März + + + April + April + + + May + Mai + + + June + Juni + + + July + Juli + + + August + August + + + September + September + + + October + Oktober + + + November + November + + + December + Dezember + + + Su + So + + + M + Mo + + + Tu + Di + + + W + Mi + + + Th + Do + + + F + Fr + + + Sa + Sa + + + Today + Heute + + + + QFileDialog + + All Files (*) + Alle Dateien (*) + + + All Files (*.*) + Alle Dateien (*.*) + + + + QInputDialog + + OK + Ok + + + Cancel + Abbrechen + + + + QLineEdit + + Clear + Löschen + + + Select All + Alles auswählen + + + &Undo + &Rückgängig + + + &Redo + &Wiederholen + + + Cu&t + &Ausschneiden + + + &Copy + &Kopieren + + + &Paste + &Einfügen + + + + QMainWindow + + Line up + Aufstellung + + + Customize... + Einstellungen... + + + + QMessageBox + + OK + OK + + + Cancel + Abbrechen + + + &Yes + &Ja + + + &No + &Nein + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for multiplatform GUI &amp; application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants.<br>Qt is also available for embedded devices.</p><p>Qt is a Trolltech product. See <tt>http://www.trolltech.com/qt/</tt> for more information.</p> + <h3>Über Qt</h3><p>Dieses Programme benutzt Qt version %1.</p><p>Qt ist ein C++ Toolkit zur Entwicklung von graphischer multiplatform Programme. Qt bietet Portabilität eines Quelltextes für MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux und alle wichtigen komerziellen UNIX-Versionen.<br>Qt ist auch für Embedded Geräte verfügbar.</p><p>Qt ist ein Produkt von Trolltech. Siehe <tt>http://www.trolltech.com/qt/</tt> für weitere Informationen.</p> + + + + QObject + + must be an integer + Muss eine Zahl sein + + + must be a decimal value + muss ein Dezimalwert sein + + + must be 0 or 1 + muss 0 oder 1 sein + + + invalid date + Datum ungültig + + + invalid time + Zein ungültig + + + no such option + Ungültige Option + + + Excess columns + Zu viele Spalten + + + Missing columns + Fehende Spalten + + + Unable to open file + Datei kann nicht geöffnet werden + + + Error in row %1 + Fehler in Zeile %1 + + + Not a valid MobileDB file + Datei ist keine gültige MobileDB + + + D + T + + + M + M + + + Y + J + + + PM + pm + + + AM + am + + + Problematic row + Problematische Zeile + + + Yes + Ja + + + No + Nein + + + Missing file + Datei fehlt + + + + QQDialog + + PortaBase + Portabase + + + + QTextEdit + + Clear + Löschen + + + Select All + Alles auswählen + + + &Undo + &Rückgängig + + + &Redo + &Wiederholen + + + Cu&t + &Ausschneiden + + + &Copy + &Kopieren + + + &Paste + &Einfügen + + + + RowEditor + + Row Editor + Zeilen bearbeiten + + + + RowViewer + + Row Viewer + Zeilen Ansicht + + + + SlideshowDialog + + Slideshow + Diashow + + + Column + Spalte + + + Delay between images + Wechsel nach + + + seconds + Sekunden + + + + SortEditor + + Sorting Editor + Sortierung bearbeiten + + + Sorting Name + Name der Sortierung + + + Sort + Sortieren + + + Column Name + Spaltenname + + + Direction + Richtung + + + Ascending + Aufsteigend + + + Descending + Absteigend + + + + TimeWidget + + AM + am + + + None + keine + + + PM + pm + + + + View + + No data to summarize + Nichts zusammenzufassen + + + Total + Total + + + Average + Duchschnitt + + + Minimum + Minimum + + + Maximum + Maximum + + + Checked + Geprüft + + + Unchecked + Ungeprüft + + + Earliest + Frühester + + + Latest + Letzter + + + Total length + Gesamtlänge + + + characters + Zeichen + + + Average length + Durchschnittliche Länge + + + Minimum length + Mindestlänge + + + Maximum length + Maximale Länge + + + Image available + Bild verfügbar + + + No image + Kein Bild + + + + ViewDisplay + + No results + Kein Ergebnis + + + No image columns in this view + Keine Bildspalten in dieser Ansicht + + + No rows in this filter + Keine Zeilen in diesem Filter + + + + ViewEditor + + View Editor + Ansicht bearbeiten + + + View Name + Name der Ansicht + + + Default Sorting + Standartsortierung + + + Default Filter + Standardfilter + + + Include + Include + + + Column Name + Spaltenname + + + None + kein + + + All Rows + Alle Zeilen + + + + XMLImport + + Error at + Fehler bei + + + Line + Zeile + + + Column + Spalte + + + only allowed as root element + nur zulässig als oberstes Element + + + Unknown element + Unbekanntes Element + + + %1 not allowed as child of %2 + %1 ist nicht zulässig als Teil von %2 + + + Missing element + Fehlendes Element + + + "c" attribute is missing or non-integer + Attribut fehlt oder ist keine Zahl + + + Unsupported + Nicht unterstützt + + + Invalid + Ungültig + + + Duplicate + Duplikat + + + Missing + Fehlt + + + Too many child nodes for node type + Zu viele Elemente für dieses Tag + + + Incorrect _all view column sequence + Incorrect _all view column sequence + + + must be 0 or 1 + muss 0 oder 1 sein + + + must be an integer + muss eine Zahl sein + + + must be a non-negative integer + muss eine positive Zahl sein + + + must be a positive integer + muss eine positive Zahl sein + + + Duplicate element + Doppeltes Element + + + Missing data for column ID %1 + Fehlende Daten für Spalte %1 + + + diff --git a/preferences.cpp b/preferences.cpp index c9cee61..99968c6 100644 --- a/preferences.cpp +++ b/preferences.cpp @@ -159,6 +159,9 @@ void Preferences::addAppearanceTab(QTabWidget *tabs) #else sizeFactor = 1; #endif +#if !defined(Q_OS_MACX) + // on the Mac, the application font seems to revert to system default + // under a variety of conditions; no point in showing this QGroupBox *fontGroup = new QGroupBox(2, Qt::Horizontal, tr("Font"), appearanceTab); layout->addWidget(fontGroup); @@ -193,6 +196,7 @@ void Preferences::addAppearanceTab(QTabWidget *tabs) connect(fontSize, SIGNAL(activated(int)), this, SLOT(updateSample(int))); new QLabel(tr("Sample"), fontGroup); sample = new QLabel(tr("Sample text"), fontGroup); +#endif QGroupBox *colorGroup = new QGroupBox(2, Qt::Horizontal, tr("Row Colors"), appearanceTab); @@ -516,6 +520,7 @@ QFont Preferences::applyChanges() } conf.writeEntry("ToolbarButtons", buttons, ','); +#if !defined(Q_OS_MACX) conf.setGroup("Font"); QString name = fontName->currentText(); int size = sizes[fontSize->currentItem()] / sizeFactor; @@ -524,6 +529,9 @@ QFont Preferences::applyChanges() QFont font(name, size); qApp->setFont(font); return font; +#else + return font(); +#endif } void Preferences::applyDateTimeChanges() diff --git a/rowviewer.cpp b/rowviewer.cpp index 9493196..2ad70dc 100644 --- a/rowviewer.cpp +++ b/rowviewer.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "database.h" #include "datatypes.h" #include "menuactions.h" @@ -38,10 +39,18 @@ RowViewer::RowViewer(Database *dbase, ViewDisplay *parent, const char *name) vbox->addWidget(tv); QHBox *hbox = new QHBox(this); vbox->addWidget(hbox); +#if defined(Q_OS_MACX) + prevButton = new QToolButton(hbox); +#else prevButton = new QPushButton(hbox); +#endif prevButton->setPixmap(Resource::loadPixmap("back")); connect(prevButton, SIGNAL(clicked()), this, SLOT(previousRow())); +#if defined(Q_OS_MACX) + QToolButton *editButton = new QToolButton(hbox); +#else QPushButton *editButton = new QPushButton(hbox); +#endif editButton->setPixmap(Resource::loadPixmap("edit")); connect(editButton, SIGNAL(clicked()), this, SLOT(editRow())); @@ -53,10 +62,18 @@ RowViewer::RowViewer(Database *dbase, ViewDisplay *parent, const char *name) viewBox->insertStringList(viewNames); connect(viewBox, SIGNAL(activated(int)), this, SLOT(viewChanged(int))); +#if defined(Q_OS_MACX) + QToolButton *copyButton = new QToolButton(hbox); +#else QPushButton *copyButton = new QPushButton(hbox); +#endif copyButton->setPixmap(Resource::loadPixmap("copy")); connect(copyButton, SIGNAL(clicked()), this, SLOT(copyText())); +#if defined(Q_OS_MACX) + nextButton = new QToolButton(hbox); +#else nextButton = new QPushButton(hbox); +#endif nextButton->setPixmap(Resource::loadPixmap("forward")); connect(nextButton, SIGNAL(clicked()), this, SLOT(nextRow())); diff --git a/rowviewer.h b/rowviewer.h index c4a4333..7f40766 100644 --- a/rowviewer.h +++ b/rowviewer.h @@ -22,6 +22,7 @@ class QComboBox; class QKeyEvent; class QPushButton; class QTextView; +class QToolButton; class View; class ViewDisplay; @@ -55,8 +56,13 @@ private slots: QComboBox *viewBox; int index; int rowCount; +#if defined(Q_OS_MACX) + QToolButton *nextButton; + QToolButton *prevButton; +#else QPushButton *nextButton; QPushButton *prevButton; +#endif QTextView *tv; View *currentView; QStringList usedImageIds; diff --git a/sorteditor.cpp b/sorteditor.cpp index 60d18a9..84ec437 100644 --- a/sorteditor.cpp +++ b/sorteditor.cpp @@ -25,7 +25,7 @@ SortEditor::SortEditor(QWidget *parent, const char *name) { QHBox *hbox = new QHBox(this); vbox->addWidget(hbox); - new QLabel(tr("Sorting Name"), hbox); + new QLabel(tr("Sorting Name") + " ", hbox); nameBox = new QLineEdit(hbox); table = new QListView(this); diff --git a/vieweditor.cpp b/vieweditor.cpp index 4465c34..c817fd6 100644 --- a/vieweditor.cpp +++ b/vieweditor.cpp @@ -26,7 +26,7 @@ ViewEditor::ViewEditor(QWidget *parent, const char *name) { QHBox *hbox = new QHBox(this); vbox->addWidget(hbox); - new QLabel(tr("View Name"), hbox); + new QLabel(tr("View Name") + " ", hbox); nameBox = new QLineEdit(hbox); hbox = new QHBox(this);