OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_panel.cpp versions 1.14 and 1.15
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_panel.cpp 1.14 -> 1.15

--- as_panel.cpp 2003/02/21 10:11:36     1.14
+++ as_panel.cpp 2003/02/21 15:04:04     1.15
@@ -31,10 +31,13 @@
 
 #include <vector>
 
+#include <qimage.h>
+
 #include "as_panel.h"
 #include "as_generic.h"
 #include "as_const.h"
 
+#include "as_gfx/revcolour.xpm"
 
 //
 // Constructs a Prefpanel as a child of 'pParent', with the 
@@ -51,7 +54,7 @@
 
     this->setSizeGripEnabled(false);
     this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
-        (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth()));
+        (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth()));
 
     // Initialize our button colours
     m_pLight = new QColor();
@@ -220,22 +223,28 @@
     m_pShadeboxlay = new QVBoxLayout(m_pShadebox->layout());
     m_pShadeboxlay->setAlignment(Qt::AlignTop);
 
-    m_pShadelayout = new QGridLayout(0, 2, 2, 11, 6, "Shadelayout");
+    m_pShadelayout = new QGridLayout(0, 2, 2, 6, 16, "Shadelayout");
     m_pLightlab = new QLabel(m_pShadebox, "Lightlabel");
+    m_pLightlab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth());
     m_pShadelayout->addWidget(m_pLightlab, 0, 0);
     m_pLightbutt = new QToolButton(m_pShadebox, "Lightbutton");
+    m_pLightbutt->setFocusPolicy(QToolButton::TabFocus);
     m_pLightbutt->setCursor(QCursor(13));
     m_pShadelayout->addWidget(m_pLightbutt, 0, 1);
 
     m_pDarklab = new QLabel(m_pShadebox, "Darklabel");
+    m_pDarklab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth());
     m_pShadelayout->addWidget(m_pDarklab, 1, 0);
     m_pDarkbutt = new QToolButton(m_pShadebox, "Darkbutton");
+    m_pDarkbutt->setFocusPolicy(QToolButton::TabFocus);
     m_pDarkbutt->setCursor(QCursor(13));
     m_pShadelayout->addWidget(m_pDarkbutt, 1, 1);
 
     m_pRevertlab = new QLabel(m_pShadebox, "Revertlabel");
     m_pShadelayout->addWidget(m_pRevertlab, 2, 0);
     m_pRevertbutt = new QToolButton(m_pShadebox, "Revertbutton");
+    m_pRevertbutt->setFocusPolicy(QToolButton::TabFocus);
+//    m_pRevertbutt->setIconSet(QIconSet(QPixmap(s_kpcRevcolour_xpm)));
     m_pRevertbutt->setCursor(QCursor(13));
     m_pShadelayout->addWidget(m_pRevertbutt, 2, 1);
 
@@ -244,11 +253,10 @@
     m_pThemebox->layout()->setSpacing(6);
     m_pThemebox->layout()->setMargin(11);
     m_pThemeboxlay = new QVBoxLayout(m_pThemebox->layout());
-    m_pThemeboxlay->setAlignment(Qt::AlignTop);
 
-    QLabel *pNuder = new QLabel(m_pThemebox, "Crapolabel");
-    pNuder->setText(trUtf8("Please ignore", "Comment for Nuderlabel"));
-    m_pThemeboxlay->addWidget(pNuder);
+    QLabel *pPlaceholder = new QLabel(m_pThemebox, "Placeholderlabel");
+    pPlaceholder->setText(trUtf8("Reserved for future use", "Comment for Placeholderlabel"));
+    m_pThemeboxlay->addWidget(pPlaceholder, 1, Qt::AlignCenter);
 
     m_pShadeboxlay->addLayout(m_pShadelayout);
     m_pColourlayout->addWidget(m_pShadebox);
@@ -329,12 +337,12 @@
 //
 void Prefpanel::shadeRevert(void)
 {
-//    delete m_pLight;
-//    m_pLight = new QColor();
-//    m_pLightbutt->setPaletteBackgroundColor(*m_pLight);
-//    delete m_pDark;
-//    m_pDark = new QColor();
-//    m_pDarkbutt->setPaletteBackgroundColor(*m_pDark);
+    delete m_pLight;
+    m_pLight = new QColor(*this->getRevlight());
+    m_pLightbutt->setPaletteBackgroundColor(*m_pLight);
+    delete m_pDark;
+    m_pDark = new QColor(*this->getRevdark());
+    m_pDarkbutt->setPaletteBackgroundColor(*m_pDark);
 }
 
 //
@@ -398,9 +406,9 @@
     m_pShadebox->setTitle(trUtf8("Row shading", "Comment for Shadebox"));
     m_pThemebox->setTitle(trUtf8("Skin themes", "Comment for Themebox"));
 
-    m_pLightlab->setText(trUtf8("Light shading", "Comment for Lightlabel"));
-    m_pDarklab->setText(trUtf8("Dark shading", "Comment for Darklabel"));
-    m_pRevertlab->setText(trUtf8("Revert defaults", "Comment for Revertlabel"));
+    m_pLightlab->setText(trUtf8("Light", "Comment for Lightlabel"));
+    m_pDarklab->setText(trUtf8("Dark", "Comment for Darklabel"));
+    m_pRevertlab->setText(trUtf8("Revert", "Comment for Revertlabel"));
     QToolTip::add(m_pLightbutt, trUtf8("Light row shading colour", "Comment for tooltip Lightbutt"));
     QWhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt"));
     QToolTip::add(m_pDarkbutt, trUtf8("Dark row shading colour", "Comment for tooltip Darkbutt"));

CVSTrac 2.0.1