Commit 8b3589a5 authored by jpbl's avatar jpbl

overscreen is working now

parent aec6fa40
......@@ -51,9 +51,16 @@ taxidermy::QWidgetBuilder::load(const QMap< QString, QString > &values)
mWidth = (*width).toInt();
}
QMap< QString, QString >::ConstIterator transparent = values.find("transparent");
QMap< QString, QString >::ConstIterator bimage = values.find("bImage");
if(bimage != values.end()) {
mBackgroundImage = qtutils::transparize(*bimage);
if(transparent == values.end() || (*transparent).toInt()) {
mBackgroundImage = qtutils::transparize(*bimage);
}
else {
std::cout << *bimage << " is not trans\n";
qtutils::retreive(*bimage, mBackgroundImage);
}
}
QMap< QString, QString >::ConstIterator bcolor = values.find("bColor");
......
......@@ -32,6 +32,12 @@ taxidermy::qtutils::addFilePath(const QString &path)
factory->addFilePath(path);
}
void
taxidermy::qtutils::retreive(const QString &image, QPixmap &pixmap)
{
pixmap = QPixmap::fromMimeSource(image);
}
QPixmap
taxidermy::qtutils::transparize(const QString &image, bool hard)
{
......
......@@ -26,6 +26,6 @@ namespace taxidermy
{
QPixmap transparize(const QString &image, bool hard = false);
void addFilePath(const QString &path);
void retreive(const QString &image, QPixmap &pixmap);
};
};
......@@ -182,6 +182,7 @@ bColor=gray
[overscreen]
type=QWidget
bImage=overscreen.png
transparent=0
# DTMF Keypad
......
......@@ -183,6 +183,7 @@ bImage=screen_main.png
[overscreen]
type=QWidget
bImage=overscreen.png
transparent=0
# DTMF Keypad
#dtmf_1=12,22
......
......@@ -38,8 +38,6 @@
// Others fixed font support "Monospace", "Fixed", "MiscFixed"
#define FONT_SIZE 10
#define SCREEN "screen_main.png"
#define OVERSCREEN "overscreen.png"
SFLLcd::SFLLcd(QWidget *parent)
: QLabel(parent, "screen", Qt::WNoAutoErase)
......@@ -54,7 +52,8 @@ SFLLcd::SFLLcd(QWidget *parent)
{
setPaletteBackgroundColor(QColor("gray"));
mOverscreen.setPaletteBackgroundColor(QColor("gray"));
//mOverscreen.hide();
mOverscreen.show();
mOverscreen.setText("test");
mUnselectedLineTimer = new QTimer(this);
QObject::connect(mUnselectedLineTimer, SIGNAL(timeout()),
this, SLOT(updateGlobalText()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment