comparison src/workstatuswidget.cpp @ 523:d869e6a18f63

Make the text labels in the work status area squeezable for small window sizes. Fixes #329
author Chris Cannam
date Tue, 15 Nov 2011 16:02:18 +0000
parents 43ddfa5e9fd0
children 533519ebc0cb
comparison
equal deleted inserted replaced
522:43ddfa5e9fd0 523:d869e6a18f63
16 */ 16 */
17 17
18 #include "workstatuswidget.h" 18 #include "workstatuswidget.h"
19 #include "debug.h" 19 #include "debug.h"
20 #include "clickablelabel.h" 20 #include "clickablelabel.h"
21 #include "squeezedlabel.h"
21 22
22 #include <QGridLayout> 23 #include <QGridLayout>
23 #include <QSpacerItem> 24 #include <QSpacerItem>
24 #include <QLabel> 25 #include <QLabel>
25 #include <QProcess> 26 #include <QProcess>
45 m_openButton = new ClickableLabel; 46 m_openButton = new ClickableLabel;
46 QFont f(m_openButton->font()); 47 QFont f(m_openButton->font());
47 f.setBold(true); 48 f.setBold(true);
48 m_openButton->setFont(f); 49 m_openButton->setFont(f);
49 m_openButton->setMouseUnderline(true); 50 m_openButton->setMouseUnderline(true);
50 m_openButton->setWordWrap(true);
51 connect(m_openButton, SIGNAL(clicked()), this, SLOT(openButtonClicked())); 51 connect(m_openButton, SIGNAL(clicked()), this, SLOT(openButtonClicked()));
52 layout->addWidget(m_openButton, row, 2, 1, 2, Qt::AlignLeft); 52 layout->addWidget(m_openButton, row, 2, 1, 2);
53 53
54 ++row; 54 ++row;
55 layout->addWidget(new QLabel(tr("Remote:")), row, 1); 55 layout->addWidget(new QLabel(tr("Remote:")), row, 1);
56 m_remoteURLLabel = new QLabel; 56 m_remoteURLLabel = new SqueezedLabel;
57 m_remoteURLLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); 57 m_remoteURLLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
58 m_remoteURLLabel->setWordWrap(true);
59 layout->addWidget(m_remoteURLLabel, row, 2, 1, 2); 58 layout->addWidget(m_remoteURLLabel, row, 2, 1, 2);
60 59
61 ++row; 60 ++row;
62 layout->addWidget(new QLabel(tr("State:")), row, 1); 61 layout->addWidget(new QLabel(tr("State:")), row, 1);
63 m_stateLabel = new QLabel; 62 m_stateLabel = new QLabel;