Vidalia  0.3.1
VAttachButton.h
Go to the documentation of this file.
1 /*
2 ** This file is part of Vidalia, and is subject to the license terms in the
3 ** LICENSE file, found in the top level directory of this distribution. If you
4 ** did not receive the LICENSE file with this file, you may obtain it from the
5 ** Vidalia source package distributed by the Vidalia Project at
6 ** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7 ** including this file, may be copied, modified, propagated, or distributed
8 ** except according to the terms described in the LICENSE file.
9 */
10 
11 /*
12 ** \file VAttachButton.cpp
13 ** \brief Button that handles detaching of tabs
14 */
15 
16 #ifndef VATTACHBUTTON_H
17 #define VATTACHBUTTON_H
18 
19 #include <QtGui>
20 
21 #include "VidaliaTab.h"
22 
23 class VAttachButton : public QPushButton {
24  Q_OBJECT
25 
26  public:
27  VAttachButton(QWidget *parent = 0);
29 
30  /** Sets the parent tab for this button */
31  void setTab(VidaliaTab *tab);
32  /** Returns the parent tab for this button */
33  VidaliaTab *getTab();
34 
35  signals:
36  /** Emitted when the button is pressed and the tab is detached */
37  void attachTab();
38  /** Emitted when the button is pressed and the tab is attached */
39  void detachTab();
40 
41  public slots:
42  /** Handles the onClicked signal */
43  void toggleAttach();
44 
45  private:
47  bool _attached;
48 };
49 
50 #endif
VidaliaTab * getTab()
void setTab(VidaliaTab *tab)
VidaliaTab * _tab
Definition: VAttachButton.h:46
VAttachButton(QWidget *parent=0)
void detachTab()
void attachTab()