Skip to content
Snippets Groups Projects
Commit 8b3589a5 authored by jpbl's avatar jpbl
Browse files

overscreen is working now

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