|
|
@ -389,7 +389,7 @@ class NorwegianWoodStyle(TQMotifStyle):
|
|
|
|
rgb=img.color(i)
|
|
|
|
rgb=img.color(i)
|
|
|
|
c=TQColor(rgb)
|
|
|
|
c=TQColor(rgb)
|
|
|
|
(r, g, b)=c.dark().rgb()
|
|
|
|
(r, g, b)=c.dark().rgb()
|
|
|
|
img.setColor(i,qRgb(r, g, b))
|
|
|
|
img.setColor(i,tqRgb(r, g, b))
|
|
|
|
mid=TQPixmap()
|
|
|
|
mid=TQPixmap()
|
|
|
|
mid.convertFromImage(img)
|
|
|
|
mid.convertFromImage(img)
|
|
|
|
|
|
|
|
|
|
|
@ -398,7 +398,7 @@ class NorwegianWoodStyle(TQMotifStyle):
|
|
|
|
rgb=img.color(i)
|
|
|
|
rgb=img.color(i)
|
|
|
|
c=TQColor(rgb)
|
|
|
|
c=TQColor(rgb)
|
|
|
|
(r, g, b)=c.light().rgb()
|
|
|
|
(r, g, b)=c.light().rgb()
|
|
|
|
img.setColor(i,qRgb(r, g, b))
|
|
|
|
img.setColor(i,tqRgb(r, g, b))
|
|
|
|
light=TQPixmap()
|
|
|
|
light=TQPixmap()
|
|
|
|
light.convertFromImage(img)
|
|
|
|
light.convertFromImage(img)
|
|
|
|
|
|
|
|
|
|
|
@ -407,7 +407,7 @@ class NorwegianWoodStyle(TQMotifStyle):
|
|
|
|
rgb=img.color(i)
|
|
|
|
rgb=img.color(i)
|
|
|
|
c=TQColor(rgb)
|
|
|
|
c=TQColor(rgb)
|
|
|
|
(r, g, b)=c.dark().rgb()
|
|
|
|
(r, g, b)=c.dark().rgb()
|
|
|
|
img.setColor(i,qRgb(r, g, b))
|
|
|
|
img.setColor(i,tqRgb(r, g, b))
|
|
|
|
dark=TQPixmap()
|
|
|
|
dark=TQPixmap()
|
|
|
|
dark.convertFromImage(img)
|
|
|
|
dark.convertFromImage(img)
|
|
|
|
|
|
|
|
|
|
|
@ -815,7 +815,7 @@ class Themes(TQMainWindow):
|
|
|
|
self.sMotif=self.style.insertItem("M&otif", self.styleMotif)
|
|
|
|
self.sMotif=self.style.insertItem("M&otif", self.styleMotif)
|
|
|
|
self.sMotifPlus=self.style.insertItem("Motif P&lus", self.styleMotifPlus)
|
|
|
|
self.sMotifPlus=self.style.insertItem("Motif P&lus", self.styleMotifPlus)
|
|
|
|
self.style.insertSeparator()
|
|
|
|
self.style.insertSeparator()
|
|
|
|
self.style.insertItem("&Quit", qApp.quit, TQt.CTRL | TQt.Key_Q)
|
|
|
|
self.style.insertItem("&Quit", tqApp.quit, TQt.CTRL | TQt.Key_Q)
|
|
|
|
|
|
|
|
|
|
|
|
self.help=TQPopupMenu(self)
|
|
|
|
self.help=TQPopupMenu(self)
|
|
|
|
self.menuBar().insertSeparator()
|
|
|
|
self.menuBar().insertSeparator()
|
|
|
@ -824,7 +824,7 @@ class Themes(TQMainWindow):
|
|
|
|
self.help.insertItem("About &TQt", self.aboutTQt)
|
|
|
|
self.help.insertItem("About &TQt", self.aboutTQt)
|
|
|
|
|
|
|
|
|
|
|
|
self.style=NorwegianWoodStyle()
|
|
|
|
self.style=NorwegianWoodStyle()
|
|
|
|
qApp.setStyle(self.style)
|
|
|
|
tqApp.setStyle(self.style)
|
|
|
|
self.menuBar().setItemChecked(self.sWood, TRUE)
|
|
|
|
self.menuBar().setItemChecked(self.sWood, TRUE)
|
|
|
|
|
|
|
|
|
|
|
|
# In the following we cannot simply set the new style as we can in C++. We
|
|
|
|
# In the following we cannot simply set the new style as we can in C++. We
|
|
|
@ -833,37 +833,37 @@ class Themes(TQMainWindow):
|
|
|
|
|
|
|
|
|
|
|
|
def styleWood(self):
|
|
|
|
def styleWood(self):
|
|
|
|
newstyle=NorwegianWoodStyle()
|
|
|
|
newstyle=NorwegianWoodStyle()
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
qApp.setFont(self.appFont, TRUE)
|
|
|
|
tqApp.setFont(self.appFont, TRUE)
|
|
|
|
self.selectStyleMenu(self.sWood)
|
|
|
|
self.selectStyleMenu(self.sWood)
|
|
|
|
|
|
|
|
|
|
|
|
def styleMetal(self):
|
|
|
|
def styleMetal(self):
|
|
|
|
newstyle=MetalStyle()
|
|
|
|
newstyle=MetalStyle()
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
qApp.setFont(self.appFont, TRUE)
|
|
|
|
tqApp.setFont(self.appFont, TRUE)
|
|
|
|
self.selectStyleMenu(self.sMetal)
|
|
|
|
self.selectStyleMenu(self.sMetal)
|
|
|
|
|
|
|
|
|
|
|
|
def stylePlatinum(self):
|
|
|
|
def stylePlatinum(self):
|
|
|
|
newstyle=TQPlatinumStyle()
|
|
|
|
newstyle=TQPlatinumStyle()
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
p=TQPalette(TQColor(239, 239, 239))
|
|
|
|
p=TQPalette(TQColor(239, 239, 239))
|
|
|
|
qApp.setPalette(p, TRUE)
|
|
|
|
tqApp.setPalette(p, TRUE)
|
|
|
|
qApp.setFont(self.appFont, TRUE)
|
|
|
|
tqApp.setFont(self.appFont, TRUE)
|
|
|
|
self.selectStyleMenu(self.sPlatinum)
|
|
|
|
self.selectStyleMenu(self.sPlatinum)
|
|
|
|
|
|
|
|
|
|
|
|
def styleWindows(self):
|
|
|
|
def styleWindows(self):
|
|
|
|
newstyle=TQWindowsStyle()
|
|
|
|
newstyle=TQWindowsStyle()
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
qApp.setFont(self.appFont, TRUE)
|
|
|
|
tqApp.setFont(self.appFont, TRUE)
|
|
|
|
self.selectStyleMenu(self.sWindows)
|
|
|
|
self.selectStyleMenu(self.sWindows)
|
|
|
|
|
|
|
|
|
|
|
|
def styleCDE(self):
|
|
|
|
def styleCDE(self):
|
|
|
|
newstyle=TQCDEStyle(TRUE)
|
|
|
|
newstyle=TQCDEStyle(TRUE)
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
self.selectStyleMenu(self.sCDE)
|
|
|
|
self.selectStyleMenu(self.sCDE)
|
|
|
|
|
|
|
|
|
|
|
@ -886,25 +886,25 @@ class Themes(TQMainWindow):
|
|
|
|
p.setColor(TQPalette.Disabled, TQColorGroup.Foreground, TQt.lightGray);
|
|
|
|
p.setColor(TQPalette.Disabled, TQColorGroup.Foreground, TQt.lightGray);
|
|
|
|
p.setColor(TQPalette.Disabled, TQColorGroup.Text, TQt.lightGray);
|
|
|
|
p.setColor(TQPalette.Disabled, TQColorGroup.Text, TQt.lightGray);
|
|
|
|
p.setColor(TQPalette.Disabled, TQColorGroup.ButtonText, TQt.lightGray);
|
|
|
|
p.setColor(TQPalette.Disabled, TQColorGroup.ButtonText, TQt.lightGray);
|
|
|
|
qApp.setPalette(p, TRUE)
|
|
|
|
tqApp.setPalette(p, TRUE)
|
|
|
|
qApp.setFont(TQFont("times", self.appFont.pointSize()), TRUE)
|
|
|
|
tqApp.setFont(TQFont("times", self.appFont.pointSize()), TRUE)
|
|
|
|
|
|
|
|
|
|
|
|
def styleMotif(self):
|
|
|
|
def styleMotif(self):
|
|
|
|
newstyle=TQMotifStyle(TRUE)
|
|
|
|
newstyle=TQMotifStyle(TRUE)
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
p=TQPalette(TQColor(192, 192, 192))
|
|
|
|
p=TQPalette(TQColor(192, 192, 192))
|
|
|
|
qApp.setPalette(p, TRUE)
|
|
|
|
tqApp.setPalette(p, TRUE)
|
|
|
|
qApp.setFont(self.appFont, TRUE)
|
|
|
|
tqApp.setFont(self.appFont, TRUE)
|
|
|
|
self.selectStyleMenu(self.sMotif)
|
|
|
|
self.selectStyleMenu(self.sMotif)
|
|
|
|
|
|
|
|
|
|
|
|
def styleMotifPlus(self):
|
|
|
|
def styleMotifPlus(self):
|
|
|
|
newstyle=TQMotifPlusStyle(TRUE)
|
|
|
|
newstyle=TQMotifPlusStyle(TRUE)
|
|
|
|
qApp.setStyle(newstyle)
|
|
|
|
tqApp.setStyle(newstyle)
|
|
|
|
self.style=newstyle
|
|
|
|
self.style=newstyle
|
|
|
|
p=TQPalette(TQColor(192, 192, 192))
|
|
|
|
p=TQPalette(TQColor(192, 192, 192))
|
|
|
|
qApp.setPalette(p, TRUE)
|
|
|
|
tqApp.setPalette(p, TRUE)
|
|
|
|
qApp.setFont(self.appFont, TRUE)
|
|
|
|
tqApp.setFont(self.appFont, TRUE)
|
|
|
|
self.selectStyleMenu(self.sMotifPlus)
|
|
|
|
self.selectStyleMenu(self.sMotifPlus)
|
|
|
|
|
|
|
|
|
|
|
|
def about(self):
|
|
|
|
def about(self):
|
|
|
|