Mercurial > hg > easaier-soundaccess
comparison widgets/RelatedMediaWidget.cpp @ 157:a535f9cb792e
enable to add info under the related media
author | lbajardsilogic |
---|---|
date | Thu, 15 Nov 2007 13:03:03 +0000 |
parents | 708c00883180 |
children | 77f4ef621c54 |
comparison
equal
deleted
inserted
replaced
156:c3296b15c43e | 157:a535f9cb792e |
---|---|
32 mediaWidget->setLayout(m_relMediaLayout); | 32 mediaWidget->setLayout(m_relMediaLayout); |
33 | 33 |
34 QScrollArea * scrollArea = new QScrollArea; | 34 QScrollArea * scrollArea = new QScrollArea; |
35 scrollArea->setWidget(mediaWidget); | 35 scrollArea->setWidget(mediaWidget); |
36 scrollArea->setWidgetResizable(true); | 36 scrollArea->setWidgetResizable(true); |
37 scrollArea->setMinimumHeight(m_relMediaMaxHeight + 50); | 37 scrollArea->setMinimumHeight(m_relMediaMaxHeight + 70); |
38 | 38 |
39 QVBoxLayout *mainLayout = new QVBoxLayout; | 39 QVBoxLayout *mainLayout = new QVBoxLayout; |
40 mainLayout->addWidget(scrollArea); | 40 mainLayout->addWidget(scrollArea); |
41 mainLayout->setSpacing(0); | 41 mainLayout->setSpacing(0); |
42 mainLayout->setMargin(0); | 42 mainLayout->setMargin(0); |
88 mediaLabel->setText("<html><header><style type=\"text/css\">a {text-decoration: none;}</style></header><body><a href=\"" + filename + | 88 mediaLabel->setText("<html><header><style type=\"text/css\">a {text-decoration: none;}</style></header><body><a href=\"" + filename + |
89 "\"><img src=\"" + imageSource + "\" width=\"" + QString::number(width) + "\" height=\"" + QString::number(height) + "\"> </a></body></html>"); | 89 "\"><img src=\"" + imageSource + "\" width=\"" + QString::number(width) + "\" height=\"" + QString::number(height) + "\"> </a></body></html>"); |
90 | 90 |
91 connect(mediaLabel, SIGNAL(linkActivated(QString)), MainWindow::instance(), SLOT(runExternProcess(QString))); | 91 connect(mediaLabel, SIGNAL(linkActivated(QString)), MainWindow::instance(), SLOT(runExternProcess(QString))); |
92 | 92 |
93 QLabel *textLabel = new QLabel(); | |
94 textLabel->setText("<html><a >Info may be added here</a><a href=\"" + filename + "\">...</a></html>"); | |
95 | |
93 m_relMediaLayout->addWidget(mediaLabel, 0, m_nbRelMedia); | 96 m_relMediaLayout->addWidget(mediaLabel, 0, m_nbRelMedia); |
97 m_relMediaLayout->addWidget(textLabel, 1, m_nbRelMedia); | |
98 | |
94 m_nbRelMedia++; | 99 m_nbRelMedia++; |
95 } | 100 } |