~ubuntu-branches/ubuntu/feisty/kdemultimedia/feisty

« back to all changes in this revision

Viewing changes to kaudiocreator/kaudiocreator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-01-17 11:22:29 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20070117112229-rgyi1k8qpj6x3unq
Tags: 4:3.5.6-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
    QVBox *frame = janusWidget->addVBoxPage(i18n("&CD Tracks"), QString::null, SmallIcon("cdaudio_unmount", 32));
59
59
    tracks = new TracksImp(frame, "Tracks");
60
 
    
61
 
    
 
60
 
62
61
    ripper  = new Ripper ( frame, "Rip" );
63
62
    encoder = new Encoder( frame, "Encoder" );
64
63
 
79
78
                                        SLOT( deselectAllTracks() ), actionCollection(), "deselect_all" );
80
79
    selectAll->setEnabled( false );
81
80
    deselectAll->setEnabled( false );
82
 
    
83
81
 
84
82
    KActionMenu *actActionMenu = new KActionMenu( i18n("Rip &Selection"), "rip", actionCollection(), "rip" );
85
83
    actActionMenu->setDelayed(true); //needed for checking "all accounts"
97
95
    connect( jobQue, SIGNAL( removeJob(int) ), this,    SLOT( updateStatus() ) );
98
96
    connect( jobQue, SIGNAL( removeJob(int) ), ripper,  SLOT( removeJob(int) ) );
99
97
    connect( jobQue, SIGNAL( removeJob(int) ), encoder, SLOT( removeJob(int)) );
100
 
    
 
98
 
101
99
    connect( ripper, SIGNAL( updateProgress(int, int) )     , jobQue,  SLOT( updateProgress(int,int) ) );
102
100
    connect( ripper, SIGNAL( addJob(Job*, const QString &) ), jobQue,  SLOT( addJob(Job*, const QString &)) );
103
101
    connect( ripper, SIGNAL( eject(const QString &) )       , tracks,  SLOT( ejectDevice(const QString &)) );
104
102
    connect( ripper, SIGNAL( encodeWav(Job *) )             , encoder, SLOT( encodeWav(Job *)) );
105
103
    connect( ripper, SIGNAL( jobsChanged() )                , this,    SLOT( updateStatus() ) );   
106
104
 
107
 
    
108
105
    connect( encoder, SIGNAL( updateProgress(int, int) )   , jobQue,  SLOT( updateProgress(int,int)) );
109
106
    connect( encoder, SIGNAL( addJob(Job*, const QString&)), jobQue,  SLOT( addJob(Job*, const QString &)) );
110
107
    connect( encoder, SIGNAL( jobsChanged() )              , this,    SLOT( updateStatus() ) );
111
 
    
 
108
 
112
109
    connect( tracks, SIGNAL( hasCD(bool) )    , this,          SLOT( hasCD(bool) ) );
113
 
    connect( tracks, SIGNAL( ripTrack(Job *) ), ripper,        SLOT( ripTrack(Job *)) );   
 
110
    connect( tracks, SIGNAL( ripTrack(Job *) ), ripper,        SLOT( ripTrack(Job *)) );
114
111
    connect( tracks, SIGNAL( hasTracks(bool) ), rip,           SLOT( setEnabled(bool)) );
115
112
    connect( tracks, SIGNAL( hasTracks(bool) ), actActionMenu, SLOT( setEnabled(bool)) );
116
113
    connect( tracks, SIGNAL( hasTracks(bool) ), deselectAll,   SLOT( setEnabled(bool)) );
117
 
    connect( tracks, SIGNAL( hasTracks(bool) ), selectAll,     SLOT( setEnabled(bool)) );   
 
114
    connect( tracks, SIGNAL( hasTracks(bool) ), selectAll,     SLOT( setEnabled(bool)) );
118
115
 
119
116
    (void)new KAction(i18n("Remove &Completed Jobs"), 0, jobQue,
120
117
          SLOT(clearDoneJobs()), actionCollection(), "clear_done_jobs" );
122
119
    KAction *edit = new KAction(i18n("&Edit Album..."), 0, tracks,
123
120
          SLOT(editInformation()), actionCollection(), "edit_cd");
124
121
    connect(tracks, SIGNAL(hasCD(bool)), edit, SLOT(setEnabled(bool)));
125
 
    edit->setEnabled( false );   
 
122
    edit->setEnabled( false );
126
123
 
127
124
    (void)new KAction(i18n("Encode &File..."), 0, this,
128
125
          SLOT(encodeFile()), actionCollection(), "encode_file");
130
127
    KAction *cddb = new KAction(i18n("&CDDB Lookup"), 0, tracks,
131
128
          SLOT(performCDDB()), actionCollection(), "cddb_now");
132
129
    connect(tracks, SIGNAL(hasCD(bool)), cddb, SLOT(setEnabled(bool)));
133
 
    cddb->setEnabled( false );   
 
130
    cddb->setEnabled( false );
134
131
 
135
132
    KStdAction::configureNotifications(this, SLOT(configureNotifications()),
136
133
          actionCollection());
137
134
    KStdAction::quit( this, SLOT(close()), actionCollection(), "quit" );
138
 
    
 
135
 
139
136
    // Init statusbar
140
137
    statusBar()->insertItem(i18n("No Audio CD detected"), 0 );
141
138
    hasCD(tracks->hasCD());
142
 
    
 
139
 
143
140
    setupGUI();
144
141
}
145
142