Changeset View
Changeset View
Standalone View
Standalone View
ui/formwidgets.h
Show First 20 Lines • Show All 349 Lines • ▼ Show 20 Line(s) | |||||
350 | 350 | | |||
351 | class SignatureEdit : public QAbstractButton, public FormWidgetIface | 351 | class SignatureEdit : public QAbstractButton, public FormWidgetIface | ||
352 | { | 352 | { | ||
353 | Q_OBJECT | 353 | Q_OBJECT | ||
354 | 354 | | |||
355 | public: | 355 | public: | ||
356 | explicit SignatureEdit( Okular::FormFieldSignature * signature, QWidget * parent = nullptr ); | 356 | explicit SignatureEdit( Okular::FormFieldSignature * signature, QWidget * parent = nullptr ); | ||
357 | 357 | | |||
358 | // This will be called when an item in signature panel is clicked. Calling it will change this | ||||
359 | // widget's state for sometime. If this widget was visible prior to calling this then background | ||||
360 | // color will change and borders will remain otherwise visibility of this widget will change. | ||||
361 | // During the change all interactions will be disabled. | ||||
362 | void setDummyMode( bool set ); | ||||
363 | | ||||
358 | protected: | 364 | protected: | ||
359 | bool event( QEvent * e ) override; | 365 | bool event( QEvent * e ) override; | ||
360 | void contextMenuEvent( QContextMenuEvent * event ) override; | 366 | void contextMenuEvent( QContextMenuEvent * event ) override; | ||
361 | void paintEvent( QPaintEvent * event ) override; | 367 | void paintEvent( QPaintEvent * event ) override; | ||
362 | 368 | | |||
363 | private Q_SLOTS: | 369 | private Q_SLOTS: | ||
364 | void slotViewRevision(); | 370 | void slotViewRevision(); | ||
365 | void slotViewProperties(); | 371 | void slotViewProperties(); | ||
366 | 372 | | |||
367 | private: | 373 | private: | ||
368 | bool m_lefMouseButtonPressed; | 374 | bool m_widgetPressed; | ||
375 | bool m_dummyMode; | ||||
376 | bool m_wasVisible; // this will help in deciding whether or not to paint border for this widget | ||||
369 | 377 | | |||
370 | DECLARE_ADDITIONAL_ACTIONS | 378 | DECLARE_ADDITIONAL_ACTIONS | ||
371 | }; | 379 | }; | ||
372 | 380 | | |||
373 | #undef DECLARE_ADDITIONAL_ACTIONS | 381 | #undef DECLARE_ADDITIONAL_ACTIONS | ||
374 | 382 | | |||
375 | #endif | 383 | #endif |