--- as_main.cpp 2002/10/21 16:52:22 1.2
+++ as_main.cpp 2002/11/08 12:21:34 1.3
@@ -1,15 +1,51 @@
#include <qapplication.h>
-#include "version.h"
-#include "top.h"
+#include <qtable.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qstringlist.h>
-int main(int argc, char *argv[])
+#include "titraq.h"
+
+// OSSP logo: static const char *ossplogo_xpm[]
+#include "gfx/ossplogo.xpm"
+
+// Table size
+const int numRows = 10;
+const int numCols = 6;
+
+int main(int argc, char **argv)
{
- QApplication App(argc, argv);
+ QApplication App(argc, argv);
+
+ QTable table(numRows, numCols);
+
+ QHeader *header = table.horizontalHeader();
+ header->setLabel(0, QObject::tr("Klein"), 40);
+ header->setLabel(1, QObject::tr("Krasse Checkung"));
+ header->setLabel(5, QObject::tr("Combo Buxen"));
+ header->setMovingEnabled(TRUE);
+
+ QImage img(ossplogo_xpm);
+ QPixmap pix = img.scaleHeight(table.rowHeight(3));
+ table.setPixmap(3, 2, pix);
+ table.setText(3, 2, "OSSP");
+
+ QStringList comboEntries;
+ comboEntries << "uno" << "dos" << "tres" << "quatro";
- KarmWindow *karm = new KarmWindow;
+ for (int i = 0; i < numRows; ++i){
+ QComboTableItem * item = new QComboTableItem(&table, comboEntries, FALSE);
+ item->setCurrentItem(i % 4);
+ table.setItem(i, 5, item);
+ }
+ for (int j = 0; j < numRows; ++j)
+ table.setItem(j, 1, new QCheckTableItem(&table, "Checkung"));
- App.setMainWidget(karm);
- karm->show();
+// Titraqform *pMainform = new Titraqform;
+// App.setMainWidget(pMainform);
+// pMainform->show();
+ App.setMainWidget(&table);
+ table.show();
return App.exec();
}
|