summaryrefslogtreecommitdiffstats
path: root/src/tabwidget.h
blob: ffedfb8b30112269df6fe229d4489f9a9d5c324b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/***************************************************************************
 *     Copyright (C) 2004 by Sashmit Bhaduri                               *
 *     smt@vfemail.net                                                     *
 *                                                                         *
 *     Licensed under GPL.                                                 *
 ***************************************************************************/

#ifndef TABWIDGET_H
#define TABWIDGET_H

#include "frame.h"

#include <ktabwidget.h>

#include <tqptrdict.h>
#include <tqstringlist.h>

namespace KlamAV
{

class TabWidget:public KTabWidget
{
    Q_OBJECT

    public:
        TabWidget(TQWidget * parent = 0, const char *name = 0, TQStringList fixedTabs = 0);
        ~TabWidget();
        void addFrame(Frame *f);
        Frame *currentFrame();
        void removeFrame(Frame *f);

        unsigned int tabBarWidthForMaxChars( uint maxLength );
        void setTitle( const TQString &title , TQWidget* sender);

    public slots:

        void slotSettingsChanged();
    signals:
        
        void currentFrameChanged(Frame *);
        
    private: // methods
        
    private slots:
        
	void slotMoveTabLeft();
	void slotMoveTabRight();
        void slotCloseTab();
        void slotCloseRequest(TQWidget* widget);
        void contextMenu (int item, const TQPoint &p);
        void slotTabChanged(TQWidget *w);
        
   private: // attributes

       TQPtrDict<Frame> m_frames;
       unsigned int m_CurrentMaxLength;
       int currentItemId;
       TQWidget* currentItem;
       TQStringList fixedTabs;
};

}

#endif