Changeset View
Changeset View
Standalone View
Standalone View
ui/signaturepanel.cpp
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Line(s) | 127 | { | |||
---|---|---|---|---|---|
131 | Q_D( SignaturePanel ); | 131 | Q_D( SignaturePanel ); | ||
132 | QVector<Okular::FormFieldSignature *> signatureForms = SignatureGuiUtils::getSignatureFormFields( d->m_document, true, -1 ); | 132 | QVector<Okular::FormFieldSignature *> signatureForms = SignatureGuiUtils::getSignatureFormFields( d->m_document, true, -1 ); | ||
133 | foreach ( auto sf, signatureForms ) | 133 | foreach ( auto sf, signatureForms ) | ||
134 | { | 134 | { | ||
135 | d->m_signatureForms[sf->id()] = sf; | 135 | d->m_signatureForms[sf->id()] = sf; | ||
136 | } | 136 | } | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | bool SignaturePanel::event( QEvent *e ) | ||||
140 | { | ||||
141 | if ( e->type() == QEvent::Show || e->type() == QEvent::Hide ) | ||||
142 | emit signaturePanelVisible( isVisible() ); | ||||
143 | | ||||
144 | return QWidget::event( e ); | ||||
145 | } | ||||
146 | | ||||
139 | SignaturePanel::~SignaturePanel() | 147 | SignaturePanel::~SignaturePanel() | ||
140 | { | 148 | { | ||
141 | Q_D( SignaturePanel ); | 149 | Q_D( SignaturePanel ); | ||
142 | d->m_document->removeObserver( this ); | 150 | d->m_document->removeObserver( this ); | ||
143 | delete d->m_model; | 151 | delete d->m_model; | ||
144 | } | 152 | } | ||
145 | 153 | | |||
146 | void SignaturePanel::setPageView( PageView *pv ) | 154 | void SignaturePanel::setPageView( PageView *pv ) | ||
147 | { | 155 | { | ||
148 | Q_D( SignaturePanel ); | 156 | Q_D( SignaturePanel ); | ||
149 | d->m_pageView = pv; | 157 | d->m_pageView = pv; | ||
150 | } | 158 | } | ||
151 | 159 | | |||
152 | #include "moc_signaturepanel.cpp" | 160 | #include "moc_signaturepanel.cpp" |