File: modulebrowser_impl.cpp

package info (click to toggle)
korelib 0.0.1-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,788 kB
  • ctags: 1,918
  • sloc: sh: 8,555; cpp: 3,989; makefile: 633; ansic: 65
file content (84 lines) | stat: -rw-r--r-- 1,849 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

#include <qapp.h>
#include <qbutton.h>
#include <qbuttongroup.h>
#include <qlistview.h>
#include <qstring.h>
#include "modulebrowser_impl.h"
#include "moduleview_impl.h"

/*
 *  Constructs a ModuleBrowserImpl which is a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'
 */
ModuleBrowserImpl::ModuleBrowserImpl( QWidget* parent,  const char* name, WFlags fl )
    : ModuleBrowserWidget( parent, name, fl )
{
}

/*
 *  Destroys the object and frees any allocated resources
 */
ModuleBrowserImpl::~ModuleBrowserImpl()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 * protected slot
 */
void ModuleBrowserImpl::slotClose()
{
    QApplication::exit(0);
}
/*
 * protected slot
 */
void ModuleBrowserImpl::slotRefreshColumns(int id)
{
    QButton* btn = showColumns->find(id);
    QString columnName(btn->name());
    columnName.remove(0,4);
    if( btn->isOn() )
    {
        moduleListView->addColumn( columnName );
    }
    else
    {
        int column;
        for(column = 0; column < moduleListView->columns() ; column++)
            if( moduleListView->columnText( column ) == columnName )
                break;
        moduleListView->removeColumn(column);
    }
}
/*
 * protected slot
 */
void ModuleBrowserImpl::slotRefreshModuleList()
{
    qWarning( "ModuleBrowserImpl::slotRefreshModuleList() not yet implemented!" );
}
/*
 * protected slot
 */
void ModuleBrowserImpl::slotSelectionChanged()
{
    qWarning( "ModuleBrowserImpl::slotSelectionChanged() not yet implemented!" );
}
/*
 * protected slot
 */
void ModuleBrowserImpl::slotShowModuleProperties()
{
    ModulePropertiesDlg* prop = new ModuleViewImpl();
    prop->show();
}
/*
 * protected slot
 */
void ModuleBrowserImpl::slotUnregisterModules()
{
    qWarning( "ModuleBrowserImpl::slotUnregisterModules() not yet implemented!" );
}