33 SettingsToolbarSnippet::SettingsToolbarSnippet(const QString& elementId, ChromeWidget * chrome, |
33 SettingsToolbarSnippet::SettingsToolbarSnippet(const QString& elementId, ChromeWidget * chrome, |
34 const QWebElement & element) |
34 const QWebElement & element) |
35 : DualButtonToolbarSnippet(elementId, chrome, element), |
35 : DualButtonToolbarSnippet(elementId, chrome, element), |
36 m_action1(0), m_action2(0) |
36 m_action1(0), m_action2(0) |
37 { |
37 { |
|
38 connect(m_chrome, SIGNAL(aspectChanged(int)) , this, SLOT(onAspectChanged())); |
38 } |
39 } |
39 |
40 |
40 SettingsToolbarSnippet::~SettingsToolbarSnippet() |
41 SettingsToolbarSnippet::~SettingsToolbarSnippet() |
41 { |
42 { |
42 if(m_action1) |
43 if(m_action1) |
43 delete m_action1; |
44 delete m_action1; |
44 if(m_action2) |
45 if(m_action2) |
45 delete m_action2; |
46 delete m_action2; |
46 } |
47 } |
47 |
48 void SettingsToolbarSnippet::onAspectChanged( ) { |
|
49 |
|
50 updateOwnerArea(); |
|
51 |
|
52 } |
48 SettingsToolbarSnippet * SettingsToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element) |
53 SettingsToolbarSnippet * SettingsToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element) |
49 { |
54 { |
50 SettingsToolbarSnippet * that = new SettingsToolbarSnippet( elementId, chrome, element ); |
55 SettingsToolbarSnippet * that = new SettingsToolbarSnippet( elementId, chrome, element ); |
51 that->setChromeWidget( new ToolbarChromeItem( that ) ); |
56 that->setChromeWidget( new ToolbarChromeItem( that ) ); |
52 return that; |
57 return that; |